Fix assertion with current player id. Only a hack, needs to be fixed properly.

This commit is contained in:
lotodore
2007-10-02 22:36:04 +00:00
parent 6a11e52eaa
commit ebd78b1a67
+18 -1
View File
@@ -143,6 +143,7 @@ void Game::initHand()
size_t i;
PlayerListConstIterator it_c;
PlayerListIterator it, it_2;
// eventuell vorhandene Hand löschen
if(actualHand) {
@@ -166,7 +167,7 @@ void Game::initHand()
}
// Spieler mit leerem Cash auf inactive setzen
PlayerListIterator it = activePlayerList->begin();
it = activePlayerList->begin();
while( it!=activePlayerList->end() ) {
@@ -179,6 +180,22 @@ void Game::initHand()
}
}
// TODO HACK
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); it++) {
if (!(*it)->getMyActiveStatus())
{
if ((*it)->getMyUniqueID() == getCurrentHand()->getCurrentBeRo()->getCurrentPlayersTurnId())
{
it_2 = it;
it_2++;
if (it_2 == runningPlayerList->end())
it_2 = runningPlayerList->begin();
getCurrentHand()->getCurrentBeRo()->setCurrentPlayersTurnId((*it_2)->getMyUniqueID());
}
}
}
runningPlayerList->clear();
(*runningPlayerList) = (*activePlayerList);