mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-26 04:30:55 +00:00
Add mobj interpolator on load netgame
This commit is contained in:
parent
5e4a57b45c
commit
a67432a415
3 changed files with 6 additions and 2 deletions
|
@ -48,7 +48,7 @@ static size_t interpolated_mobjs_capacity = 0;
|
|||
|
||||
// NOTE: This will NOT check that the mobj has already been added, for perf
|
||||
// reasons.
|
||||
static void AddInterpolatedMobj(mobj_t *mobj)
|
||||
void P_AddMobjInterpolator(mobj_t *mobj)
|
||||
{
|
||||
if (interpolated_mobjs_len >= interpolated_mobjs_capacity)
|
||||
{
|
||||
|
@ -11010,7 +11010,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
if (CheckForReverseGravity && !(mobj->flags & MF_NOBLOCKMAP))
|
||||
P_CheckGravity(mobj, false);
|
||||
|
||||
AddInterpolatedMobj(mobj);
|
||||
P_AddMobjInterpolator(mobj);
|
||||
|
||||
return mobj;
|
||||
}
|
||||
|
|
|
@ -506,6 +506,8 @@ void P_EmeraldManager(void);
|
|||
|
||||
// Initialize internal mobj interpolator list (e.g. during level loading)
|
||||
void P_InitMobjInterpolators(void);
|
||||
// Add interpolation state for the given mobj
|
||||
void P_AddMobjInterpolator(mobj_t *mobj);
|
||||
void P_UpdateMobjInterpolators(void);
|
||||
void P_ResetMobjInterpolationState(mobj_t *mobj);
|
||||
void P_ResetPrecipitationMobjInterpolationState(precipmobj_t *mobj);
|
||||
|
|
|
@ -2969,6 +2969,8 @@ static thinker_t* LoadMobjThinker(actionf_p1 thinker)
|
|||
|
||||
mobj->info = (mobjinfo_t *)next; // temporarily, set when leave this function
|
||||
|
||||
P_AddMobjInterpolator(mobj);
|
||||
|
||||
return &mobj->thinker;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue