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

View File

@@ -353,22 +353,25 @@ void GameStateDuel::Update(float dt)
}
game->Update(dt);
if (game->gameOver){
credits->compute(game->players[0],game->players[1], mParent);
mGamePhase = DUEL_STATE_END;
if (game->players[1]->playMode != Player::MODE_TEST_SUITE)
credits->compute(game->players[0],game->players[1], mParent);
mGamePhase = DUEL_STATE_END;
#ifdef TESTSUITE
if (mParent->players[1] == PLAYER_TYPE_TESTSUITE){
if (testSuite->loadNext()){
loadTestSuitePlayers();
mGamePhase = DUEL_STATE_PLAY;
testSuite->initGame();
}else
mGamePhase = DUEL_STATE_END;
}else
if (mParent->players[1] == PLAYER_TYPE_TESTSUITE){
if (testSuite->loadNext()){
loadTestSuitePlayers();
mGamePhase = DUEL_STATE_PLAY;
testSuite->initGame();
}
else
mGamePhase = DUEL_STATE_END;
}
else
#endif
if (mParent->players[0] == PLAYER_TYPE_CPU && mParent->players[1] == PLAYER_TYPE_CPU){
End();
Start();
}
if (mParent->players[0] == PLAYER_TYPE_CPU && mParent->players[1] == PLAYER_TYPE_CPU){
End();
Start();
}
}
if (mEngine->GetButtonClick(JGE_BTN_MENU)) {
if (!menu) {