From a60e2b51e2c9d06e9df18ae5ccd95289ee04b012 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Sat, 26 Aug 2023 18:29:56 +0700 Subject: [PATCH] Disable fixes angles for natives GetBonePosition/GetAttachment if ReGameDLL is running --- reapi/src/reapi_utils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reapi/src/reapi_utils.cpp b/reapi/src/reapi_utils.cpp index 5fc7f6e..2a42644 100644 --- a/reapi/src/reapi_utils.cpp +++ b/reapi/src/reapi_utils.cpp @@ -175,7 +175,8 @@ void GetBonePosition(CBaseEntity *pEntity, int iBone, Vector *pVecOrigin, Vector GET_BONE_POSITION(pEdict, iBone, vecOrigin, vecAngles); pEntity->pev->angles.x = -pEntity->pev->angles.x; - if (!pEntity->IsPlayer()) { + // ReGameDLL already have fixes angles for non-players entities + if (!g_ReGameApi && !pEntity->IsPlayer()) { FixupAngles(pEdict, vecOrigin); } @@ -208,7 +209,8 @@ void GetAttachment(CBaseEntity *pEntity, int iAttachment, Vector *pVecOrigin, Ve GET_ATTACHMENT(pEdict, iAttachment, vecOrigin, vecAngles); - if (!pEntity->IsPlayer()) { + // ReGameDLL already have fixes angles for non-players entities + if (!g_ReGameApi && !pEntity->IsPlayer()) { FixupAngles(pEdict, vecOrigin); }