mirror of
https://github.com/ENSL/NS.git
synced 2025-03-14 06:34:33 +00:00
Fixed bug with ladder climbing
This commit is contained in:
parent
261caa1c55
commit
754c48327e
2 changed files with 4 additions and 4 deletions
|
@ -3408,8 +3408,9 @@ void LadderMove(AvHAIPlayer* pBot, const Vector StartPoint, const Vector EndPoin
|
|||
return;
|
||||
}
|
||||
|
||||
Vector nearestLadderTop = UTIL_GetNearestLadderTopPoint(pEdict);
|
||||
|
||||
if (bIsGoingUpLadder && (pBot->CollisionHullTopLocation.z > EndPoint.z))
|
||||
if (bIsGoingUpLadder && ((pBot->CollisionHullTopLocation.z > EndPoint.z) || (pBot->Edict->v.origin.z > nearestLadderTop.z)))
|
||||
{
|
||||
pBot->desiredMovementDir = vForward;
|
||||
|
||||
|
@ -3428,8 +3429,7 @@ void LadderMove(AvHAIPlayer* pBot, const Vector StartPoint, const Vector EndPoin
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
Vector nearestLadderTop = UTIL_GetNearestLadderTopPoint(pEdict);
|
||||
|
||||
|
||||
if (pBot->Edict->v.origin.z < nearestLadderTop.z)
|
||||
{
|
||||
|
|
|
@ -623,7 +623,7 @@ void AIMGR_UpdateAIPlayers()
|
|||
|
||||
UpdateBotChat(bot);
|
||||
|
||||
AIPlayerThink(bot);
|
||||
DroneThink(bot);
|
||||
|
||||
EndBotFrame(bot);
|
||||
|
||||
|
|
Loading…
Reference in a new issue