Skip to content

Conversation

@sunzenshen
Copy link
Contributor

Description

Also rename ConVar enabling the path reservation system to be more general

Toolchain

  • Windows MSVC VS2022

Linked Issues

Also rename ConVar enabling the path reservation system to be more generic
@sunzenshen
Copy link
Contributor Author

@sunzenshen sunzenshen added the Bots Related to bot players label Jan 23, 2026
AdamTadeusz
AdamTadeusz previously approved these changes Jan 23, 2026
Rainyan
Rainyan previously approved these changes Jan 24, 2026
ConVar neo_bot_path_friendly_reservation_enable("neo_bot_path_friendly_reservation_enable", "1", FCVAR_NONE,
"Enable friendly bot path dispersal", true, 0, false, 1);
ConVar neo_bot_path_reservation_enable("neo_bot_path_reservation_enable", "1", FCVAR_NONE,
"Enable bot path reservation system", true, 0, false, 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should bMax be true instead of false here for the cvar ctor?

@Rainyan Rainyan self-requested a review January 24, 2026 08:37
@Rainyan
Copy link
Collaborator

Rainyan commented Jan 24, 2026

I just noticed we have the cvar neo_bot_path_reservation_enabled, and also another cvar called neo_bot_path_reservation_enable. Should we merge these into a single cvar?

$ git log --oneline -n 1
fba77b2f (HEAD -> path-reservation-team-arrays-optimization) Reduce team allocation for path reservation

$ grep -snrI neo_bot_path_reservation_enable[^d] src
src/game/server/neo/bot/neo_bot_path_cost.cpp:9:ConVar neo_bot_path_reservation_enable("neo_bot_path_reservation_enable", "1", FCVAR_NONE,
src/game/server/neo/bot/neo_bot_path_cost.cpp:26:       m_bIgnoreReservations = !neo_bot_path_reservation_enable.GetBool();
src/game/server/neo/bot/neo_bot_path_cost.cpp:115:              if ( neo_bot_path_reservation_enable.GetBool()

$ grep -snrI neo_bot_path_reservation_enabled src
src/game/server/neo/bot/neo_bot_path_compute.cpp:11:extern ConVar neo_bot_path_reservation_enabled;
src/game/server/neo/bot/neo_bot_path_compute.cpp:18:    if (!neo_bot_path_reservation_enabled.GetBool() || !path.IsValid())
src/game/server/neo/bot/neo_bot_path_reservation.cpp:10:ConVar neo_bot_path_reservation_enabled("neo_bot_path_reservation_enabled", "1", FCVAR_NONE, "Enable the bot path reservation system.");
src/game/server/neo/bot/neo_bot_path_reservation.h:80:extern ConVar neo_bot_path_reservation_enabled;

@Rainyan Rainyan dismissed their stale review January 24, 2026 08:40

GitHub requires me to write something deep and insightful in this field.

if ( neo_bot_path_friendly_reservation_enable.GetBool()
&& !m_bIgnoreReservations
&& (m_routeType != FASTEST_ROUTE) )
if ( !m_bIgnoreReservations && (m_routeType != FASTEST_ROUTE) )
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realized that m_bIgnoreReservations was already set based on neo_bot_path_friendly_reservation_enable in the constructor, so there's no need to check the latter again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bots Related to bot players

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants