- Fixed: Using -playdemo in conjunction with -loadgame did not work.

SVN r3481 (trunk)
This commit is contained in:
Randy Heit 2012-03-25 01:54:36 +00:00
commit cc34f973e2
3 changed files with 24 additions and 13 deletions

View file

@ -1035,6 +1035,9 @@ void G_Ticker ()
G_DoAutoSave ();
gameaction = ga_nothing;
break;
case ga_loadgameplaydemo:
G_DoLoadGame ();
// fallthrough
case ga_playdemo:
G_DoPlayDemo ();
break;
@ -2366,7 +2369,7 @@ FString defdemoname;
void G_DeferedPlayDemo (const char *name)
{
defdemoname = name;
gameaction = ga_playdemo;
gameaction = (gameaction == ga_loadgame) ? ga_loadgameplaydemo : ga_playdemo;
}
CCMD (playdemo)
@ -2449,7 +2452,11 @@ bool G_ProcessIFFDemo (char *mapname)
mapname[8] = 0;
demo_p += 8;
rngseed = ReadLong (&demo_p);
FRandom::StaticClearRandom ();
// Only reset the RNG if this demo is not in conjunction with a savegame.
if (mapname[0] != 0)
{
FRandom::StaticClearRandom ();
}
consoleplayer = *demo_p++;
break;
@ -2578,7 +2585,10 @@ void G_DoPlayDemo (void)
// don't spend a lot of time in loadlevel
precache = false;
demonew = true;
G_InitNew (mapname, false);
if (mapname[0] != 0)
{
G_InitNew (mapname, false);
}
C_HideConsole ();
demonew = false;
precache = true;
@ -2599,7 +2609,7 @@ void G_TimeDemo (const char* name)
singletics = true;
defdemoname = name;
gameaction = ga_playdemo;
gameaction = (gameaction == ga_loadgame) ? ga_loadgameplaydemo : ga_playdemo;
}