fix: problems with breakable on cs_mari (ref #686)

fix: goal selection on some zombie  maps (ref #684)
This commit is contained in:
jeefo 2025-04-03 15:12:06 +03:00
commit d6d76e136d
No known key found for this signature in database
GPG key ID: D696786B81B667C8
12 changed files with 95 additions and 86 deletions

View file

@ -11,12 +11,13 @@ ConVar cv_has_team_semiclip ("has_team_semiclip", "0", "When enabled, bots will
ConVar cv_graph_slope_height ("graph_slope_height", "24.0", "Determines the maximum slope height change between the current and next node to consider the current link as a jump link. Only for generated graphs.", true, 12.0f, 48.0f);
int Bot::findBestGoal () {
if (m_isCreature) {
if (!graph.m_terrorPoints.empty ()) {
if (game.is (GameFlags::ZombieMod) && m_isCreature) {
const auto &players = bots.countTeamPlayers ();
if (players.first < graph.m_terrorPoints.length <int> ()) {
return graph.m_terrorPoints.random ();
}
if (!graph.m_goalPoints.empty ()) {
else if (players.first < graph.m_goalPoints.length <int> ()) {
return graph.m_goalPoints.random ();
}
return graph.random ();