2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +03:00

R_Studio Hull: Fixed checks wrong index of hitbox shield

This commit is contained in:
s1lent 2019-09-22 01:58:01 +07:00
parent 84ac04bc0d
commit e7232be7e1
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -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;