NSEntity: add method ::Relink()

This commit is contained in:
Marco Cawthorne 2023-09-20 20:50:54 -07:00
parent 65400fea2c
commit a1500166be
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
3 changed files with 10 additions and 0 deletions

View File

@ -368,4 +368,7 @@ public:
nonvirtual float GetSpawnTime(void);
/** Move the entity to a new position, with updated angles. */
nonvirtual void Transport(vector, vector);
/** Relink the entity against the world. Updates PVS info etc. */
nonvirtual void Relink(void);
};

View File

@ -979,4 +979,10 @@ NSEntity::Transport(vector new_pos, vector new_ang)
if (flags & FL_CLIENT)
Client_FixAngle(this, new_ang);
#endif
}
void
NSEntity::Relink(void)
{
setorigin(this, origin);
}

View File

@ -48,6 +48,7 @@
callfunction(self.classname); \
} \
x ##_e.ReceiveEntity( y, readfloat() );\
x ##_e.Relink();\
}
#else