From 5eaa967c5c96640be39f38c869ba839edec7a35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20Mat=C4=9Bjka?= Date: Thu, 18 Feb 2016 15:41:09 +0100 Subject: [PATCH] Fix GetBonePosition angles --- rehlds/engine/r_studio.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rehlds/engine/r_studio.cpp b/rehlds/engine/r_studio.cpp index 96ccbb6..6b3b5d1 100644 --- a/rehlds/engine/r_studio.cpp +++ b/rehlds/engine/r_studio.cpp @@ -908,12 +908,21 @@ void EXT_FUNC AnimationAutomove(const edict_t *pEdict, float flTime) /* <8411a> ../engine/r_studio.c:1329 */ void EXT_FUNC GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles) { - pstudiohdr = (studiohdr_t *)Mod_Extradata(g_psv.models[pEdict->v.modelindex]); + vec3_t angles; +#ifdef REHLDS_FIXES + angles[0] = -pEdict->v.angles[0]; + angles[1] = pEdict->v.angles[1]; + angles[2] = pEdict->v.angles[2]; +#else + angles[0] = pEdict->v.angles[0]; + angles[1] = pEdict->v.angles[1]; + angles[2] = pEdict->v.angles[2]; +#endif g_pSvBlendingAPI->SV_StudioSetupBones( g_psv.models[pEdict->v.modelindex], pEdict->v.frame, pEdict->v.sequence, - pEdict->v.angles, + angles, pEdict->v.origin, pEdict->v.controller, pEdict->v.blending,