mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Add forwardmove rng backwards compat with demos
This commit is contained in:
parent
29f7ecd460
commit
dc9346a45d
3 changed files with 11 additions and 0 deletions
|
@ -58,6 +58,7 @@ static UINT8 demoflags;
|
|||
static UINT16 demoversion;
|
||||
boolean singledemo; // quit after playing a demo from cmdline
|
||||
boolean demo_start; // don't start playing demo right away
|
||||
boolean demo_forwardmove_rng; // old demo backwards compatibility
|
||||
boolean demosynced = true; // console warning message
|
||||
|
||||
boolean metalrecording; // recording as metal sonic
|
||||
|
@ -2028,6 +2029,7 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
version = READUINT8(demo_p);
|
||||
subversion = READUINT8(demo_p);
|
||||
demoversion = READUINT16(demo_p);
|
||||
demo_forwardmove_rng = (demoversion < 0x0010);
|
||||
switch(demoversion)
|
||||
{
|
||||
case 0x000f:
|
||||
|
@ -2339,6 +2341,7 @@ UINT8 G_CheckDemoForError(char *defdemoname)
|
|||
demo_p++; // version
|
||||
demo_p++; // subversion
|
||||
demoversion = READUINT16(demo_p);
|
||||
demo_forwardmove_rng = (demoversion < 0x0010);
|
||||
switch(demoversion)
|
||||
{
|
||||
case 0x000d:
|
||||
|
|
|
@ -38,6 +38,7 @@ extern demo_file_override_e demofileoverride;
|
|||
// Quit after playing a demo from cmdline.
|
||||
extern boolean singledemo;
|
||||
extern boolean demo_start;
|
||||
extern boolean demo_forwardmove_rng;
|
||||
extern boolean demosynced;
|
||||
|
||||
extern mobj_t *metalplayback;
|
||||
|
|
|
@ -11623,6 +11623,13 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
cmd = &player->cmd;
|
||||
|
||||
if (demoplayback && demo_forwardmove_rng)
|
||||
{
|
||||
// Smelly demo backwards compatibility
|
||||
if (cmd->forwardmove)
|
||||
P_RandomFixed();
|
||||
}
|
||||
|
||||
#ifdef PARANOIA
|
||||
if (player->playerstate == PST_REBORN)
|
||||
I_Error("player %s is in PST_REBORN\n", sizeu1(playeri));
|
||||
|
|
Loading…
Reference in a new issue