Initialize TimeCounter to 0 on load-game (this ensures the gameclock isn't

running in the savegame)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@532 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
ghaushe
2003-01-05 23:19:52 +00:00
parent bd8d3053d2
commit 8f91cb52f6
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -148,6 +148,12 @@ LoadGame (COUNT which_game, SUMMARY_DESC *summary_desc)
GLOBAL (avail_race_q) = avail_q;
GLOBAL (npc_built_ship_q) = npc_q;
GLOBAL (built_ship_q) = player_q;
// It shouldn't be possible to ever save with TimeCounter != 0
// But if it does happen, it needs to be reset to 0, since on load
// the clock semaphore is gauranteed to be 0
if (GLOBAL (GameClock.TimeCounter) != 0)
fprintf (stderr, "Warning: Game clock wasn't stopped during save, Savegame may be corrupt!\n");
GLOBAL (GameClock.TimeCounter) = 0;
LoadShipQueue (fh, &GLOBAL (avail_race_q), FALSE);
if (!(NextActivity & START_INTERPLANETARY))