fixed game_blackjack point counter
authorpk910 <philipp@zoelle1.de>
Mon, 12 Nov 2012 15:42:36 +0000 (16:42 +0100)
committerpk910 <philipp@zoelle1.de>
Mon, 12 Nov 2012 15:44:56 +0000 (16:44 +0100)
src/modules/NeonFun.mod/game_blackjack.c

index f49cae1..f2576dc 100644 (file)
@@ -308,7 +308,8 @@ void bj_action_take_card(struct bj_game *game, struct bj_player *player) {
     }
     reply(game->textbot, player->chanuser->user, "NF_BJ_TAKE", cardbuf, cardpoints);
     bj_show_player_cards(game, player);
-    if(points + cardpoints > 21)
+    points = bj_get_player_card_points(player);
+    if(points > 21)
         reply(game->textbot, player->chanuser->user, "NF_BJ_POINTS_EXCEEDED");
     game->timer = timeq_add(30, module_id, bj_player_timeout, game);
 }