NSRenderableEntity: Run Math_FixDelta() on our angles before networking

anything to make sure we're within the network constraints of the protocol.
This commit is contained in:
Marco Cawthorne 2022-03-02 09:15:41 -08:00
parent 169bd80fc8
commit 390f127898
Signed by: eukara
GPG Key ID: C196CD8BA993248A
1 changed files with 3 additions and 0 deletions

View File

@ -188,6 +188,9 @@ NSRenderableEntity::SendEntity(entity ePEnt, float fChanged)
WriteCoord(MSG_ENTITY, origin[2]);
}
if (fChanged & BASEFL_CHANGED_ANGLES) {
angles[0] = Math_FixDelta(angles[0]);
angles[1] = Math_FixDelta(angles[1]);
angles[2] = Math_FixDelta(angles[2]);
WriteShort(MSG_ENTITY, angles[0] * 32767 / 360);
WriteShort(MSG_ENTITY, angles[1] * 32767 / 360);
WriteShort(MSG_ENTITY, angles[2] * 32767 / 360);