fixed another buffer overflow in config parser

fixed memory leak in translation
fixed bots don't shoot through walls
fixed bots don't buy anything, if server issues sv_restart 1
fixed inability to kick bot's, when playing on Xash3D engine
This commit is contained in:
Dmitry 2015-06-18 19:29:40 +03:00 committed by jeefo
commit 2b005a6a98
6 changed files with 29 additions and 16 deletions

View file

@ -667,7 +667,7 @@ Bot *BotManager::GetHighestFragsBot (int team)
return GetBot (bestIndex);
}
void BotManager::CheckTeamEconomics (int team)
void BotManager::CheckTeamEconomics (int team, bool setTrue)
{
// this function decides is players on specified team is able to buy primary weapons by calculating players
// that have not enough money to buy primary (with economics), and if this result higher 80%, player is can't
@ -675,7 +675,7 @@ void BotManager::CheckTeamEconomics (int team)
extern ConVar yb_economics_rounds;
if (!yb_economics_rounds.GetBool ())
if (!yb_economics_rounds.GetBool () || setTrue)
{
m_economicsGood[team] = true;
return; // don't check economics while economics disable
@ -1158,7 +1158,7 @@ void Bot::Kick (void)
{
// this function kick off one bot from the server.
ServerCommand ("kick #%d", GETPLAYERUSERID (GetEntity ()));
ServerCommand ("kick \"%s\"", STRING (pev->netname));
CenterPrint ("Bot '%s' kicked", STRING (pev->netname));
// balances quota