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
+17 -14
View File
@@ -353,22 +353,25 @@ void GameStateDuel::Update(float dt)
} }
game->Update(dt); game->Update(dt);
if (game->gameOver){ if (game->gameOver){
credits->compute(game->players[0],game->players[1], mParent); if (game->players[1]->playMode != Player::MODE_TEST_SUITE)
mGamePhase = DUEL_STATE_END; credits->compute(game->players[0],game->players[1], mParent);
mGamePhase = DUEL_STATE_END;
#ifdef TESTSUITE #ifdef TESTSUITE
if (mParent->players[1] == PLAYER_TYPE_TESTSUITE){ if (mParent->players[1] == PLAYER_TYPE_TESTSUITE){
if (testSuite->loadNext()){ if (testSuite->loadNext()){
loadTestSuitePlayers(); loadTestSuitePlayers();
mGamePhase = DUEL_STATE_PLAY; mGamePhase = DUEL_STATE_PLAY;
testSuite->initGame(); testSuite->initGame();
}else }
mGamePhase = DUEL_STATE_END; else
}else mGamePhase = DUEL_STATE_END;
}
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();
Start(); Start();
} }
} }
if (mEngine->GetButtonClick(JGE_BTN_MENU)) { if (mEngine->GetButtonClick(JGE_BTN_MENU)) {
if (!menu) { if (!menu) {