Skip to content
Merged
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
5 changes: 4 additions & 1 deletion src/game/server/neo/bot/neo_bot_path_cost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ ConVar neo_bot_path_friendly_reservation_enable("neo_bot_path_friendly_reservati
ConVar neo_bot_path_around_friendly_cooldown("neo_bot_path_around_friendly_cooldown", "2.0", FCVAR_CHEAT,
"How often to check for friendly path dispersion", false, 0, false, 60);

ConVar neo_bot_path_penalty_jump_multiplier("neo_bot_path_penalty_jump_multiplier", "100.0", FCVAR_CHEAT,
"Maximum penalty multiplier for jump height changes in pathfinding", false, 0.01f, false, 1000.0f);

//-------------------------------------------------------------------------------------------------
CNEOBotPathCost::CNEOBotPathCost(CNEOBot* me, RouteType routeType)
{
Expand Down Expand Up @@ -71,7 +74,7 @@ float CNEOBotPathCost::operator()(CNavArea* baseArea, CNavArea* fromArea, const
}

// jumping is slower than flat ground
const float jumpPenalty = 2.0f;
const float jumpPenalty = neo_bot_path_penalty_jump_multiplier.GetFloat() * Square( deltaZ / m_maxJumpHeight );
dist *= jumpPenalty;
}
else if (deltaZ < -m_maxDropHeight)
Expand Down