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:
parent
84ac04bc0d
commit
e7232be7e1
@ -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] };
|
vec_t angles2[3] = { -angles[0], angles[1], angles[2] };
|
||||||
g_pSvBlendingAPI->SV_StudioSetupBones(pModel, frame, sequence, angles2, origin, pcontroller, pblending, -1, pEdict);
|
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);
|
mstudiobbox_t *pbbox = (mstudiobbox_t *)((char *)pstudiohdr + pstudiohdr->hitboxindex);
|
||||||
for (int i = 0; i < pstudiohdr->numhitboxes; i++)
|
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;
|
studio_hull_hitgroup[i] = pbbox[i].group;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user