mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
SW: If a saved load is loaded at a point which is right after killing
a boss, ensure that FinishTimer and FinishAnim are appropriately updated. This commit bumps GameVersion. Additionally, the set of FinishAnim to 0 in NewLevel had to move to a different location (InitLevelGlobals2), so it doesn't override the value stored in the saved game. # Conflicts: # source/sw/src/game.cpp
This commit is contained in:
parent
157933e902
commit
22b492a5b3
2 changed files with 10 additions and 3 deletions
|
@ -140,8 +140,7 @@ SWBOOL Global_PLock = TRUE;
|
|||
SWBOOL Global_PLock = FALSE;
|
||||
#endif
|
||||
|
||||
// 12 was original source release. For future releases increment by two.
|
||||
int GameVersion = 17;
|
||||
int GameVersion = 20;
|
||||
|
||||
char DemoText[3][64];
|
||||
int DemoTextYstart = 0;
|
||||
|
@ -943,6 +942,7 @@ void InitLevelGlobals2(void)
|
|||
InitTimingVars();
|
||||
TotalKillable = 0;
|
||||
Bunny_Count = 0;
|
||||
FinishAnim = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1339,7 +1339,6 @@ void NewLevel(void)
|
|||
STAT_Update(true);
|
||||
}
|
||||
}
|
||||
FinishAnim = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@ extern SWBOOL NewGame;
|
|||
extern char CacheLastLevel[];
|
||||
extern short PlayingLevel;
|
||||
extern int GodMode;
|
||||
extern int FinishTimer;
|
||||
extern SWBOOL FinishAnim;
|
||||
extern int GameVersion;
|
||||
//extern short Zombies;
|
||||
|
||||
|
@ -664,6 +666,9 @@ bool GameInterface::SaveGame(FSaveGameNode *sv)
|
|||
MWRITE(UserMapName,sizeof(UserMapName),1,fil);
|
||||
MWRITE(&GodMode,sizeof(GodMode),1,fil);
|
||||
|
||||
MWRITE(&FinishTimer,sizeof(FinishTimer),1,fil);
|
||||
MWRITE(&FinishAnim,sizeof(FinishAnim),1,fil);
|
||||
|
||||
MWRITE(&serpwasseen, sizeof(serpwasseen), 1, fil);
|
||||
MWRITE(&sumowasseen, sizeof(sumowasseen), 1, fil);
|
||||
MWRITE(&zillawasseen, sizeof(zillawasseen), 1, fil);
|
||||
|
@ -1051,6 +1056,9 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
|
|||
MREAD(UserMapName,sizeof(UserMapName),1,fil);
|
||||
MREAD(&GodMode,sizeof(GodMode),1,fil);
|
||||
|
||||
MREAD(&FinishTimer,sizeof(FinishTimer),1,fil);
|
||||
MREAD(&FinishAnim,sizeof(FinishAnim),1,fil);
|
||||
|
||||
MREAD(&serpwasseen, sizeof(serpwasseen), 1, fil);
|
||||
MREAD(&sumowasseen, sizeof(sumowasseen), 1, fil);
|
||||
MREAD(&zillawasseen, sizeof(zillawasseen), 1, fil);
|
||||
|
|
Loading…
Reference in a new issue