Skip to content
Permalink
Browse files

R_Studio Hull: Fixed checks wrong index of hitbox shield

  • Loading branch information
s1lentq committed Sep 21, 2019
1 parent 84ac04b commit e7232be7e1c25ab9b62ef247583972e25aa25124
Showing with 8 additions and 1 deletion.
  1. +8 −1 rehlds/engine/r_studio.cpp
@@ -629,10 +629,17 @@ hull_t *R_StudioHull(model_t *pModel, float frame, int sequence, const vec_t *an
vec_t angles2[3] = { -angles[0], angles[1], angles[2] };
g_pSvBlendingAPI->SV_StudioSetupBones(pModel, frame, sequence, angles2, origin, pcontroller, pblending, -1, pEdict);

#ifdef REHLDS_FIXES
const int hitboxShieldIndex = 20;
#else
// NOTE: numhitboxes range [0,21], so index 21 it's unreachable code for loop
const int hitboxShieldIndex = 21;
#endif

mstudiobbox_t *pbbox = (mstudiobbox_t *)((char *)pstudiohdr + pstudiohdr->hitboxindex);
for (int i = 0; i < pstudiohdr->numhitboxes; i++)
{
if (bSkipShield && i == 21) continue;
if (bSkipShield && i == hitboxShieldIndex) continue;

studio_hull_hitgroup[i] = pbbox[i].group;

0 comments on commit e7232be

Please sign in to comment.
You can’t perform that action at this time.