bump version number
fixed some of coverity warnings
This commit is contained in:
parent
4b0188222f
commit
1259276bcb
8 changed files with 15 additions and 14 deletions
|
|
@ -235,7 +235,7 @@ void Bot::CheckGrenadeThrow (void)
|
|||
|
||||
int friendCount = GetNearbyFriendsNearPosition (path->origin, 256.0f);
|
||||
|
||||
if (friendCount != 0 || !(m_difficulty == 4 && friendCount != 0))
|
||||
if (friendCount > 0 && m_difficulty < 4)
|
||||
continue;
|
||||
|
||||
m_throw = path->origin;
|
||||
|
|
|
|||
|
|
@ -1022,7 +1022,7 @@ void Bot::CombatFight (void)
|
|||
|
||||
if (m_currentWeapon == WEAPON_KNIFE) // knife?
|
||||
approach = 100;
|
||||
if ((m_states & STATE_SUSPECT_ENEMY) && !(m_states & STATE_SEEING_ENEMY)) // if suspecting enemy stand still
|
||||
else if ((m_states & STATE_SUSPECT_ENEMY) && !(m_states & STATE_SEEING_ENEMY)) // if suspecting enemy stand still
|
||||
approach = 49;
|
||||
else if (m_isReloading || m_isVIP) // if reloading or vip back off
|
||||
approach = 29;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ void Engine::Precache (edict_t *startEntity)
|
|||
|
||||
m_isBotCommand = false;
|
||||
m_argumentCount = 0;
|
||||
m_arguments[0] = { 0, };
|
||||
m_arguments[0] = 0x0;
|
||||
|
||||
m_localEntity = NULL;
|
||||
m_startEntity = startEntity;
|
||||
|
|
@ -324,7 +324,7 @@ void Engine::IssueBotCommand (edict_t *ent, const char *fmt, ...)
|
|||
if (IsNullString (string))
|
||||
return;
|
||||
|
||||
m_arguments[0] = { 0, };
|
||||
m_arguments[0] = 0x0;
|
||||
m_argumentCount = 0;
|
||||
|
||||
m_isBotCommand = true;
|
||||
|
|
@ -377,7 +377,7 @@ void Engine::IssueBotCommand (edict_t *ent, const char *fmt, ...)
|
|||
}
|
||||
m_isBotCommand = false;
|
||||
|
||||
m_arguments[0] = { 0, };
|
||||
m_arguments[0] = 0x0;
|
||||
m_argumentCount = 0;
|
||||
}
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ const char *Engine::ExtractSingleField (const char *string, int id, bool termina
|
|||
// this function gets and returns a particular field in a string where several strings are concatenated
|
||||
|
||||
static char field[256];
|
||||
field[0] = { 0, };
|
||||
field[0] = 0x0;
|
||||
|
||||
int pos = 0, count = 0, start = 0, stop = 0;
|
||||
int length = strlen (string);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//
|
||||
//
|
||||
// Yet Another POD-Bot, based on PODBot by Markus Klinge ("CountFloyd").
|
||||
// Copyright (c) YaPB Development Team.
|
||||
//
|
||||
|
|
@ -544,6 +544,7 @@ void Bot::CheckTerrain (float movedDistance, const Vector &dirNormal)
|
|||
state[i] = 0;
|
||||
i++;
|
||||
|
||||
#if 0
|
||||
if (bits & PROBE_DUCK)
|
||||
{
|
||||
state[i] = 0;
|
||||
|
|
@ -555,7 +556,8 @@ void Bot::CheckTerrain (float movedDistance, const Vector &dirNormal)
|
|||
state[i] += 5;
|
||||
}
|
||||
else
|
||||
state[i] = 0;
|
||||
#endif
|
||||
state[i] = 0;
|
||||
i++;
|
||||
|
||||
// weighted all possible moves, now sort them to start with most probable
|
||||
|
|
|
|||
|
|
@ -779,9 +779,6 @@ void SoundAttachToClients (edict_t *ent, const char *sample, float volume)
|
|||
}
|
||||
Client *client = &g_clients[index];
|
||||
|
||||
if (client == NULL)
|
||||
return;
|
||||
|
||||
if (strncmp ("player/bhit_flesh", sample, 17) == 0 || strncmp ("player/headshot", sample, 15) == 0)
|
||||
{
|
||||
// hit/fall sound?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue