Only do Mobj and RNG consistancy checking when actually in a level.

Mobjs are completely irrelevant outside of levels and the PRNG is not used in a synchronised way in anywhere except when in levels either
This commit is contained in:
Sryder 2018-07-03 20:53:37 +01:00
parent c8f61edea5
commit 0375ea4f0b

View file

@ -4341,7 +4341,7 @@ static INT16 Consistancy(void)
{
if (!playeringame[i])
ret ^= 0xCCCC;
else if (!players[i].mo);
else if (!players[i].mo || gamestate != GS_LEVEL);
else
{
ret += players[i].mo->x;
@ -4352,7 +4352,7 @@ static INT16 Consistancy(void)
}
// I give up
// Coop desynching enemies is painful
if (!G_RaceGametype())
if (!G_RaceGametype() && gamestate == GS_LEVEL)
ret += P_GetRandSeed();
#ifdef MOBJCONSISTANCY
@ -4361,6 +4361,8 @@ static INT16 Consistancy(void)
DEBFILE(va("Consistancy = %u\n", ret));
return ret;
}
if (gamestate == GS_LEVEL)
{
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
@ -4427,6 +4429,7 @@ static INT16 Consistancy(void)
ret += mo->frame;
}
}
}
#endif
DEBFILE(va("Consistancy = %u\n", (ret & 0xFFFF)));