From 6e292359d9091e7a3d76aeb6d36ab6438b8649c5 Mon Sep 17 00:00:00 2001 From: Amos Date: Fri, 18 Aug 2023 00:44:52 +0200 Subject: [PATCH] CBaseEntity::m_rgflCoordinateFrame is a matrix3x4_t Change type and add static assert to prevent mistakes made by accidentally making the struct bigger (which will create many bugs). --- r5dev/game/server/baseentity.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r5dev/game/server/baseentity.h b/r5dev/game/server/baseentity.h index 7a3b2c2f..8d6c513a 100644 --- a/r5dev/game/server/baseentity.h +++ b/r5dev/game/server/baseentity.h @@ -148,7 +148,7 @@ protected: Vector3D m_vecAbsVelocity; Vector3D m_vecAngVelocity; char gap_3f4[12]; - float m_rgflCoordinateFrame[12]; + matrix3x4_t m_rgflCoordinateFrame; float m_flFriction; float m_flLocalTime; float m_flVPhysicsUpdateLocalTime; @@ -255,6 +255,7 @@ protected: char m_realmsTransmitMaskCached[16]; int m_realmsTransmitMaskCachedSerialNumber; }; +static_assert(sizeof(CBaseEntity) == 2824); inline CMemory p_CBaseEntity__GetBaseEntity; inline CBaseEntity*(*v_CBaseEntity__GetBaseEntity)(CBaseEntity* thisp);