Skip to content

Commit

Permalink
Disable fixes angles for natives GetBonePosition/GetAttachment if ReG…
Browse files Browse the repository at this point in the history
…ameDLL is running
  • Loading branch information
s1lentq committed Aug 26, 2023
1 parent 28fe32e commit a60e2b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions reapi/src/reapi_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit a60e2b5

Please sign in to comment.