mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'forwardmove-rng-what-da-hell' into 'next'
Remove P_RandomFixed call when players are moving See merge request STJr/SRB2!2057
This commit is contained in:
commit
a956aadb15
3 changed files with 10 additions and 3 deletions
|
@ -58,6 +58,7 @@ static UINT8 demoflags;
|
||||||
static UINT16 demoversion;
|
static UINT16 demoversion;
|
||||||
boolean singledemo; // quit after playing a demo from cmdline
|
boolean singledemo; // quit after playing a demo from cmdline
|
||||||
boolean demo_start; // don't start playing demo right away
|
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 demosynced = true; // console warning message
|
||||||
|
|
||||||
boolean metalrecording; // recording as metal sonic
|
boolean metalrecording; // recording as metal sonic
|
||||||
|
@ -2028,6 +2029,7 @@ void G_DoPlayDemo(char *defdemoname)
|
||||||
version = READUINT8(demo_p);
|
version = READUINT8(demo_p);
|
||||||
subversion = READUINT8(demo_p);
|
subversion = READUINT8(demo_p);
|
||||||
demoversion = READUINT16(demo_p);
|
demoversion = READUINT16(demo_p);
|
||||||
|
demo_forwardmove_rng = (demoversion < 0x0010);
|
||||||
switch(demoversion)
|
switch(demoversion)
|
||||||
{
|
{
|
||||||
case 0x000f:
|
case 0x000f:
|
||||||
|
@ -2339,6 +2341,7 @@ UINT8 G_CheckDemoForError(char *defdemoname)
|
||||||
demo_p++; // version
|
demo_p++; // version
|
||||||
demo_p++; // subversion
|
demo_p++; // subversion
|
||||||
demoversion = READUINT16(demo_p);
|
demoversion = READUINT16(demo_p);
|
||||||
|
demo_forwardmove_rng = (demoversion < 0x0010);
|
||||||
switch(demoversion)
|
switch(demoversion)
|
||||||
{
|
{
|
||||||
case 0x000d:
|
case 0x000d:
|
||||||
|
|
|
@ -38,6 +38,7 @@ extern demo_file_override_e demofileoverride;
|
||||||
// Quit after playing a demo from cmdline.
|
// Quit after playing a demo from cmdline.
|
||||||
extern boolean singledemo;
|
extern boolean singledemo;
|
||||||
extern boolean demo_start;
|
extern boolean demo_start;
|
||||||
|
extern boolean demo_forwardmove_rng;
|
||||||
extern boolean demosynced;
|
extern boolean demosynced;
|
||||||
|
|
||||||
extern mobj_t *metalplayback;
|
extern mobj_t *metalplayback;
|
||||||
|
|
|
@ -11623,9 +11623,12 @@ void P_PlayerThink(player_t *player)
|
||||||
|
|
||||||
cmd = &player->cmd;
|
cmd = &player->cmd;
|
||||||
|
|
||||||
// Add some extra randomization.
|
if (demoplayback && demo_forwardmove_rng)
|
||||||
if (cmd->forwardmove)
|
{
|
||||||
P_RandomFixed();
|
// Smelly demo backwards compatibility
|
||||||
|
if (cmd->forwardmove)
|
||||||
|
P_RandomFixed();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
if (player->playerstate == PST_REBORN)
|
if (player->playerstate == PST_REBORN)
|
||||||
|
|
Loading…
Reference in a new issue