Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sp/src/game/server/ai_basenpc_movement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

#ifdef MAPBASE
ConVar ai_jump_max_up( "ai_jump_max_up", "80", FCVAR_CHEAT );
ConVar ai_jump_max_distance( "ai_jump_max_distance", "250", FCVAR_CHEAT );
ConVar ai_jump_max_down( "ai_jump_max_down", "192", FCVAR_CHEAT );
#endif

//=============================================================================
// PATHING & HIGHER LEVEL MOVEMENT
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -318,9 +324,15 @@ bool CAI_BaseNPC::IsJumpLegal( const Vector &startPos, const Vector &apex, const
//-----------------------------------------------------------------------------
bool CAI_BaseNPC::IsJumpLegal( const Vector &startPos, const Vector &apex, const Vector &endPos ) const
{
#ifdef MAPBASE
float MAX_JUMP_RISE = ai_jump_max_up.GetFloat();
float MAX_JUMP_DISTANCE = ai_jump_max_distance.GetFloat();
float MAX_JUMP_DROP = ai_jump_max_down.GetFloat();
#else
const float MAX_JUMP_RISE = 80.0f;
const float MAX_JUMP_DISTANCE = 250.0f;
const float MAX_JUMP_DROP = 192.0f;
#endif

return IsJumpLegal( startPos, apex, endPos, MAX_JUMP_RISE, MAX_JUMP_DROP, MAX_JUMP_DISTANCE );
}
Expand Down