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:
@@ -1,4 +1,5 @@
|
|||||||
Changes towards version 0.2:
|
Changes towards version 0.2:
|
||||||
|
- Check for a deadlock in savedgames and try to continue -PhracturedBlue
|
||||||
- Added an option ('-a') to display 'PC-style' course-scan -PhracturedBlue
|
- Added an option ('-a') to display 'PC-style' course-scan -PhracturedBlue
|
||||||
- Fixed deadlock races in new FlushGraphics method -PhracturedBlue
|
- Fixed deadlock races in new FlushGraphics method -PhracturedBlue
|
||||||
- FlushGraphics now waits and notifies on a per-thread level
|
- FlushGraphics now waits and notifies on a per-thread level
|
||||||
|
|||||||
@@ -148,6 +148,12 @@ LoadGame (COUNT which_game, SUMMARY_DESC *summary_desc)
|
|||||||
GLOBAL (avail_race_q) = avail_q;
|
GLOBAL (avail_race_q) = avail_q;
|
||||||
GLOBAL (npc_built_ship_q) = npc_q;
|
GLOBAL (npc_built_ship_q) = npc_q;
|
||||||
GLOBAL (built_ship_q) = player_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);
|
LoadShipQueue (fh, &GLOBAL (avail_race_q), FALSE);
|
||||||
if (!(NextActivity & START_INTERPLANETARY))
|
if (!(NextActivity & START_INTERPLANETARY))
|
||||||
|
|||||||
Reference in New Issue
Block a user