correct version string
report valid number of remaining enemies in chatter increased periodic think interval
This commit is contained in:
parent
2ff557eb89
commit
6502c44050
3 changed files with 8 additions and 5 deletions
|
|
@ -1824,7 +1824,7 @@ void Bot::SetConditions (void)
|
||||||
ChatterMessage (Chatter_SniperKilled);
|
ChatterMessage (Chatter_SniperKilled);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (m_numEnemiesLeft)
|
switch (GetNearbyEnemiesNearPosition (pev->origin, 99999.0f))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (Random.Long (0, 100) < 50)
|
if (Random.Long (0, 100) < 50)
|
||||||
|
|
@ -3006,7 +3006,7 @@ void Bot::PeriodicThink (void)
|
||||||
m_lastEnemy = NULL;
|
m_lastEnemy = NULL;
|
||||||
m_lastEnemyOrigin = nullvec;
|
m_lastEnemyOrigin = nullvec;
|
||||||
}
|
}
|
||||||
m_timePeriodicUpdate = GetWorldTime () + 0.25f;
|
m_timePeriodicUpdate = GetWorldTime () + 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bot::RunTask_Normal (void)
|
void Bot::RunTask_Normal (void)
|
||||||
|
|
@ -5455,7 +5455,7 @@ void Bot::HandleChatterMessage (const char *tempMessage)
|
||||||
{
|
{
|
||||||
// this function is added to prevent engine crashes with: 'Message XX started, before message XX ended', or something.
|
// this function is added to prevent engine crashes with: 'Message XX started, before message XX ended', or something.
|
||||||
|
|
||||||
if (FStrEq (tempMessage, "#CTs_Win") && (m_team == TEAM_CF))
|
if (FStrEq (tempMessage, "#CTs_Win") && m_team == TEAM_CF)
|
||||||
{
|
{
|
||||||
if (g_timeRoundMid > GetWorldTime ())
|
if (g_timeRoundMid > GetWorldTime ())
|
||||||
ChatterMessage (Chatter_QuicklyWonTheRound);
|
ChatterMessage (Chatter_QuicklyWonTheRound);
|
||||||
|
|
@ -5463,7 +5463,7 @@ void Bot::HandleChatterMessage (const char *tempMessage)
|
||||||
ChatterMessage (Chatter_WonTheRound);
|
ChatterMessage (Chatter_WonTheRound);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FStrEq (tempMessage, "#Terrorists_Win") && (m_team == TEAM_TF))
|
if (FStrEq (tempMessage, "#Terrorists_Win") && m_team == TEAM_TF)
|
||||||
{
|
{
|
||||||
if (g_timeRoundMid > GetWorldTime ())
|
if (g_timeRoundMid > GetWorldTime ())
|
||||||
ChatterMessage (Chatter_QuicklyWonTheRound);
|
ChatterMessage (Chatter_QuicklyWonTheRound);
|
||||||
|
|
|
||||||
|
|
@ -911,6 +911,9 @@ void GameDLLInit (void)
|
||||||
// execute main config
|
// execute main config
|
||||||
ServerCommand ("exec addons/yapb/conf/yapb.cfg");
|
ServerCommand ("exec addons/yapb/conf/yapb.cfg");
|
||||||
|
|
||||||
|
// set correct version string
|
||||||
|
yb_version.SetString (FormatBuffer ("%s.0.%u", yb_version.GetString (), GenerateBuildNumber ()));
|
||||||
|
|
||||||
// register fake metamod command handler if we not! under mm
|
// register fake metamod command handler if we not! under mm
|
||||||
if (!g_isMetamod)
|
if (!g_isMetamod)
|
||||||
RegisterCommand ("meta", CommandHandler_NotMM);
|
RegisterCommand ("meta", CommandHandler_NotMM);
|
||||||
|
|
|
||||||
|
|
@ -220,7 +220,7 @@ Bot *BotManager::FindOneValidAliveBot (void)
|
||||||
|
|
||||||
for (int i = 0; i < GetMaxClients (); i++)
|
for (int i = 0; i < GetMaxClients (); i++)
|
||||||
{
|
{
|
||||||
if (m_bots[i] != NULL && IsAlive (m_bots[i]->GetEntity ()))
|
if (m_bots[i] != NULL && IsAlive (m_bots[i]->GetEntity ()) && foundBots.GetSize () < 5)
|
||||||
foundBots.Push (i);
|
foundBots.Push (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue