- Fixed: After respawning in a singleplayer demo, demo playback went out

of sync becase the RNG seed was being altered during recording but not
  during playback. This was caused by an inappropriate fix for a similar
  problem: -record calls G_InitNew() before it actually starts recording
  the demo, but -playdemo calls G_InitNew() after it starts playback. So
  the rngseed stored in the demo was already altered. The correct thing
  to do is not to prevent the rngseed from changing during playback but
  to move the call to G_InitNew() after the call to G_BeginRecording().
- Fixed: After respawning in a demo, demo playback was prematurely
  terminated.


SVN r50 (trunk)
This commit is contained in:
Randy Heit 2006-04-16 19:09:36 +00:00
commit fa7987005e
7 changed files with 41 additions and 22 deletions

View file

@ -147,7 +147,7 @@ extern BOOL netdemo;
extern int NewWidth, NewHeight, NewBits, DisplayBits;
EXTERN_CVAR (Bool, st_scale)
extern BOOL gameisdead;
extern BOOL demorecording;
extern bool demorecording;
extern bool M_DemoNoPlay; // [RH] if true, then skip any demos in the loop
extern cycle_t WallCycles, PlaneCycles, MaskedCycles, WallScanCycles;
@ -2282,12 +2282,15 @@ void D_DoomMain (void)
G_LoadGame (file);
}
if (gameaction != ga_loadgame)
{
BorderNeedRefresh = screen->GetPageCount ();
if (autostart || netgame)
{
CheckWarpTransMap (startmap, true);
if (demorecording)
G_BeginRecording (startmap);
G_InitNew (startmap, false);
}
else
@ -2295,9 +2298,10 @@ void D_DoomMain (void)
D_StartTitle (); // start up intro loop
}
}
if (demorecording)
G_BeginRecording ();
else if (demorecording)
{
G_BeginRecording (NULL);
}
atterm (D_QuitNetGame); // killough