From 81f206284d489b54c927f8cdec7a0f74e6d78f1f Mon Sep 17 00:00:00 2001 From: lotodore Date: Wed, 3 Oct 2007 12:28:10 +0000 Subject: [PATCH] Fixed assertion fix again. --- src/game.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index cf7060f3..c1ba448d 100755 --- a/src/game.cpp +++ b/src/game.cpp @@ -145,12 +145,6 @@ void Game::initHand() PlayerListConstIterator it_c; PlayerListIterator it, it_2; - // eventuell vorhandene Hand löschen - if(actualHand) { - delete actualHand; - actualHand = 0; - } - actualHandID++; // calculate smallBlind @@ -180,21 +174,27 @@ void Game::initHand() } } + // eventuell vorhandene Hand löschen + if(actualHand) { + // TODO HACK - for(it=seatsList->begin(); it!=seatsList->end(); it++) { - if (!(*it)->getMyActiveStatus()) - { - if ((*it)->getMyUniqueID() == getCurrentHand()->getCurrentBeRo()->getCurrentPlayersTurnId()) + for(it=seatsList->begin(); it!=seatsList->end(); it++) { + if (!(*it)->getMyActiveStatus()) { - it_2 = it; - it_2++; - if (it_2 == seatsList->end()) - it_2 = seatsList->begin(); - getCurrentHand()->getCurrentBeRo()->setCurrentPlayersTurnId((*it_2)->getMyUniqueID()); + if ((*it)->getMyUniqueID() == getCurrentHand()->getCurrentBeRo()->getCurrentPlayersTurnId()) + { + it_2 = it; + it_2++; + if (it_2 == seatsList->end()) + it_2 = seatsList->begin(); + getCurrentHand()->getCurrentBeRo()->setCurrentPlayersTurnId((*it_2)->getMyUniqueID()); + } } } - } + delete actualHand; + actualHand = 0; + } runningPlayerList->clear(); (*runningPlayerList) = (*activePlayerList);