Fixed startpos not saving
Will now load properly from a save game preventing respawning at the wrong player starts.
This commit is contained in:
parent
85cefd8516
commit
0fe2d72b75
2 changed files with 16 additions and 8 deletions
|
|
@ -96,6 +96,8 @@
|
|||
static FRandom pr_dmspawn ("DMSpawn");
|
||||
static FRandom pr_pspawn ("PlayerSpawn");
|
||||
|
||||
extern int startpos, laststartpos;
|
||||
|
||||
bool WriteZip(const char* filename, const FileSys::FCompressedBuffer* content, size_t contentcount);
|
||||
bool G_CheckDemoStatus (void);
|
||||
void G_ReadDemoTiccmd (ticcmd_t *cmd, int player);
|
||||
|
|
@ -2146,7 +2148,9 @@ void G_DoLoadGame ()
|
|||
|
||||
arc("ticrate", time[0])
|
||||
("leveltime", time[1])
|
||||
("globalfreeze", globalfreeze);
|
||||
("globalfreeze", globalfreeze)
|
||||
("startpos", startpos)
|
||||
("laststartpos", laststartpos);
|
||||
// dearchive all the modifications
|
||||
level.time = Scale(time[1], TICRATE, time[0]);
|
||||
|
||||
|
|
@ -2434,6 +2438,10 @@ void G_DoSaveGame (bool okForQuicksave, bool forceQuicksave, FString filename, c
|
|||
savegameglobals("leveltime", level.time);
|
||||
}
|
||||
|
||||
savegameglobals("globalfreeze", globalfreeze)
|
||||
("startpos", startpos)
|
||||
("laststartpos", laststartpos);
|
||||
|
||||
STAT_Serialize(savegameglobals);
|
||||
FRandom::StaticWriteRNGState(savegameglobals);
|
||||
P_WriteACSDefereds(savegameglobals);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue