The Test Suite was incorrectly updating and writing player save data.

( ie task list was being updated, set information being evaluated, etc )
put a guard around the endgame stat update process to only update when non-testsuite games are played.

Issue: 488
This commit is contained in:
techdragon.nguyen@gmail.com
2010-10-14 16:13:45 +00:00
parent 5d26989f2c
commit da4ab477ae
+5 -2
View File
@@ -353,6 +353,7 @@ void GameStateDuel::Update(float dt)
} }
game->Update(dt); game->Update(dt);
if (game->gameOver){ if (game->gameOver){
if (game->players[1]->playMode != Player::MODE_TEST_SUITE)
credits->compute(game->players[0],game->players[1], mParent); credits->compute(game->players[0],game->players[1], mParent);
mGamePhase = DUEL_STATE_END; mGamePhase = DUEL_STATE_END;
#ifdef TESTSUITE #ifdef TESTSUITE
@@ -361,9 +362,11 @@ void GameStateDuel::Update(float dt)
loadTestSuitePlayers(); loadTestSuitePlayers();
mGamePhase = DUEL_STATE_PLAY; mGamePhase = DUEL_STATE_PLAY;
testSuite->initGame(); testSuite->initGame();
}else }
else
mGamePhase = DUEL_STATE_END; mGamePhase = DUEL_STATE_END;
}else }
else
#endif #endif
if (mParent->players[0] == PLAYER_TYPE_CPU && mParent->players[1] == PLAYER_TYPE_CPU){ if (mParent->players[0] == PLAYER_TYPE_CPU && mParent->players[1] == PLAYER_TYPE_CPU){
End(); End();