Fixed Onos ladder code

Onos ladder detection was assuming player was 64 units high instead of actual 108. By correcting the assumed hull size for Onos players, it now detects ladders as reliably as other player sizes.
This commit is contained in:
RGreenlees 2023-09-07 10:51:14 +01:00 committed by pierow
parent d6c9aa93af
commit fcaa98aefe
1 changed files with 7 additions and 0 deletions

View File

@ -4942,6 +4942,13 @@ physent_t *PM_Ladder( void )
hull = (hull_t *)pmove->PM_HullForBsp( pe, test );
num = hull->firstclipnode;
// Engine returns monster hull (64x64x64) for Onos, but Onos uses custom (64x64x108). We correct it here
if (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER5)
{
hull->clip_mins[2] = -54.0f;
hull->clip_maxs[2] = 54.0f;
}
// Offset the test point appropriately for this hull.
VectorSubtract ( pmove->origin, test, test);