fix: bots can't plant bomb on multi-scenario maps (fix #537)
This commit is contained in:
parent
61407341a0
commit
c03d8ac790
3 changed files with 462 additions and 460 deletions
2
.gitattributes
vendored
2
.gitattributes
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
# Auto detect text files and perform LF normalization
|
# Auto detect text files and perform LF normalization
|
||||||
* text=auto
|
* text=lf
|
||||||
|
|
||||||
# Custom for Visual Studio
|
# Custom for Visual Studio
|
||||||
*.sln merge=union
|
*.sln merge=union
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ void Bot::normal_ () {
|
||||||
|
|
||||||
// don't allow vip on as_ maps to camp + don't allow terrorist carrying c4 to camp
|
// don't allow vip on as_ maps to camp + don't allow terrorist carrying c4 to camp
|
||||||
if (campingAllowed
|
if (campingAllowed
|
||||||
&& (m_isVIP || (game.mapIs (MapFlags::Demolition)&& m_team == Team::Terrorist && !bots.isBombPlanted () && m_hasC4))) {
|
&& (m_isVIP || (game.mapIs (MapFlags::Demolition) && m_team == Team::Terrorist && !bots.isBombPlanted () && m_hasC4))) {
|
||||||
campingAllowed = false;
|
campingAllowed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -182,7 +182,7 @@ void Bot::normal_ () {
|
||||||
m_hostages.clear ();
|
m_hostages.clear ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (m_team == Team::Terrorist && rg.chance (75)) {
|
else if (m_team == Team::Terrorist && rg.chance (75) && !game.mapIs (MapFlags::Demolition)) {
|
||||||
const int index = findDefendNode (m_path->origin);
|
const int index = findDefendNode (m_path->origin);
|
||||||
|
|
||||||
startTask (Task::Camp, TaskPri::Camp, kInvalidNodeIndex, game.time () + rg.get (60.0f, 120.0f), true); // push camp task on to stack
|
startTask (Task::Camp, TaskPri::Camp, kInvalidNodeIndex, game.time () + rg.get (60.0f, 120.0f), true); // push camp task on to stack
|
||||||
|
|
@ -193,7 +193,9 @@ void Bot::normal_ () {
|
||||||
pushChatterMessage (Chatter::GoingToGuardVIPSafety); // play info about that
|
pushChatterMessage (Chatter::GoingToGuardVIPSafety); // play info about that
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (game.mapIs (MapFlags::Demolition) && ((m_pathFlags & NodeFlag::Goal) && m_inBombZone)) {
|
|
||||||
|
// was elseif here but brokes csde_ scenario
|
||||||
|
if (game.mapIs (MapFlags::Demolition) && (m_pathFlags & NodeFlag::Goal) && m_inBombZone) {
|
||||||
// is it a terrorist carrying the bomb?
|
// is it a terrorist carrying the bomb?
|
||||||
if (m_hasC4) {
|
if (m_hasC4) {
|
||||||
if ((m_states & Sense::SeeingEnemy) && numFriendsNear (pev->origin, 768.0f) == 0) {
|
if ((m_states & Sense::SeeingEnemy) && numFriendsNear (pev->origin, 768.0f) == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue