fix: do not prevent buying on fy_* maps, (fix #325)
If you need to prevent bots buying on specific map use map-cfg with yb_botbuy 0.
This commit is contained in:
parent
bb839a9c80
commit
06774a4282
4 changed files with 4 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ CR_DECLARE_SCOPED_ENUM (MapFlags,
|
||||||
Demolition = cr::bit (2),
|
Demolition = cr::bit (2),
|
||||||
Escape = cr::bit (3),
|
Escape = cr::bit (3),
|
||||||
KnifeArena = cr::bit (4),
|
KnifeArena = cr::bit (4),
|
||||||
Fun = cr::bit (5),
|
FightYard = cr::bit (5),
|
||||||
HasDoors = cr::bit (10), // additional flags
|
HasDoors = cr::bit (10), // additional flags
|
||||||
HasButtons = cr::bit (11) // map has buttons
|
HasButtons = cr::bit (11) // map has buttons
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1108,7 +1108,7 @@ void Bot::checkMsgQueue () {
|
||||||
}
|
}
|
||||||
|
|
||||||
// prevent teams from buying on fun maps
|
// prevent teams from buying on fun maps
|
||||||
if (game.mapIs (MapFlags::KnifeArena | MapFlags::Fun)) {
|
if (game.mapIs (MapFlags::KnifeArena)) {
|
||||||
m_buyState = BuyState::Done;
|
m_buyState = BuyState::Done;
|
||||||
|
|
||||||
if (game.mapIs (MapFlags::KnifeArena)) {
|
if (game.mapIs (MapFlags::KnifeArena)) {
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ void Game::levelInitialize (edict_t *entities, int max) {
|
||||||
|
|
||||||
// next maps doesn't have map-specific entities, so determine it by name
|
// next maps doesn't have map-specific entities, so determine it by name
|
||||||
if (strncmp (getMapName (), "fy_", 3) == 0) {
|
if (strncmp (getMapName (), "fy_", 3) == 0) {
|
||||||
m_mapFlags |= MapFlags::Fun;
|
m_mapFlags |= MapFlags::FightYard;
|
||||||
}
|
}
|
||||||
else if (strncmp (getMapName (), "ka_", 3) == 0) {
|
else if (strncmp (getMapName (), "ka_", 3) == 0) {
|
||||||
m_mapFlags |= MapFlags::KnifeArena;
|
m_mapFlags |= MapFlags::KnifeArena;
|
||||||
|
|
|
||||||
|
|
@ -1785,7 +1785,7 @@ void BotManager::selectLeaders (int team, bool reset) {
|
||||||
m_leaderChoosen[Team::CT] = true;
|
m_leaderChoosen[Team::CT] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (game.mapIs (MapFlags::Escape | MapFlags::KnifeArena | MapFlags::Fun)) {
|
else if (game.mapIs (MapFlags::Escape | MapFlags::KnifeArena | MapFlags::FightYard)) {
|
||||||
auto bot = bots.findHighestFragBot (team);
|
auto bot = bots.findHighestFragBot (team);
|
||||||
|
|
||||||
if (!m_leaderChoosen[team] && bot) {
|
if (!m_leaderChoosen[team] && bot) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue