mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 22:01:01 +00:00
Merge branch 'netsave-pmomz-fix' into 'next'
Include pmomz for mobjs in net savestates and load if it exists (Resolves #713) Closes #713 See merge request STJr/SRB2!1675
This commit is contained in:
commit
3e8e6bcbb8
1 changed files with 3 additions and 1 deletions
|
@ -1603,7 +1603,7 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
diff2 = 0;
|
||||
|
||||
// not the default but the most probable
|
||||
if (mobj->momx != 0 || mobj->momy != 0 || mobj->momz != 0)
|
||||
if (mobj->momx != 0 || mobj->momy != 0 || mobj->momz != 0 || mobj->pmomz !=0)
|
||||
diff |= MD_MOM;
|
||||
if (mobj->radius != mobj->info->radius)
|
||||
diff |= MD_RADIUS;
|
||||
|
@ -1778,6 +1778,7 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
WRITEFIXED(save_p, mobj->momx);
|
||||
WRITEFIXED(save_p, mobj->momy);
|
||||
WRITEFIXED(save_p, mobj->momz);
|
||||
WRITEFIXED(save_p, mobj->pmomz);
|
||||
}
|
||||
if (diff & MD_RADIUS)
|
||||
WRITEFIXED(save_p, mobj->radius);
|
||||
|
@ -2776,6 +2777,7 @@ static thinker_t* LoadMobjThinker(actionf_p1 thinker)
|
|||
mobj->momx = READFIXED(save_p);
|
||||
mobj->momy = READFIXED(save_p);
|
||||
mobj->momz = READFIXED(save_p);
|
||||
mobj->pmomz = READFIXED(save_p);
|
||||
} // otherwise they're zero, and the memset took care of it
|
||||
|
||||
if (diff & MD_RADIUS)
|
||||
|
|
Loading…
Reference in a new issue