SaveMobjThinker: fix diff2 uninitialized

This commit is contained in:
James R 2023-06-14 20:09:32 -07:00
parent 5eeb29d552
commit 86be5f7354

View file

@ -2355,6 +2355,8 @@ static void SaveMobjThinker(savebuffer_t *save, const thinker_t *th, const UINT8
if (mobj->type == MT_SPARK)
return;
diff2 = 0;
if (mobj->spawnpoint)
{
// spawnpoint is not modified but we must save it since it is an identifier
@ -2408,8 +2410,6 @@ static void SaveMobjThinker(savebuffer_t *save, const thinker_t *th, const UINT8
}
}
diff2 = 0;
// not the default but the most probable
if (mobj->momx != 0 || mobj->momy != 0 || mobj->momz != 0 || mobj->pmomz != 0)
diff |= MD_MOM;