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:
parent
d75d5bad44
commit
2b005a6a98
6 changed files with 29 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue