improved sniping
fixed bots never choice camping tactic, due to agression level oveflow cosmetic changes
This commit is contained in:
parent
363b430c41
commit
9e5c1540f9
13 changed files with 336 additions and 310 deletions
|
|
@ -736,8 +736,8 @@ void RoundInit (void)
|
|||
g_roundEnded = false;
|
||||
|
||||
// check team economics
|
||||
bots.CheckTeamEconomics (TEAM_TF);
|
||||
bots.CheckTeamEconomics (TEAM_CF);
|
||||
bots.CheckTeamEconomics (TERRORIST);
|
||||
bots.CheckTeamEconomics (CT);
|
||||
|
||||
for (int i = 0; i < GetMaxClients (); i++)
|
||||
{
|
||||
|
|
@ -753,8 +753,8 @@ void RoundInit (void)
|
|||
g_timeBombPlanted = 0.0f;
|
||||
g_timeNextBombUpdate = 0.0f;
|
||||
|
||||
g_leaderChoosen[TEAM_CF] = false;
|
||||
g_leaderChoosen[TEAM_TF] = false;
|
||||
g_leaderChoosen[CT] = false;
|
||||
g_leaderChoosen[TERRORIST] = false;
|
||||
|
||||
g_lastRadioTime[0] = 0.0f;
|
||||
g_lastRadioTime[1] = 0.0f;
|
||||
|
|
@ -1306,6 +1306,9 @@ 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?
|
||||
|
|
@ -1362,7 +1365,6 @@ void SoundSimulateUpdate (int playerIndex)
|
|||
// this function tries to simulate playing of sounds to let the bots hear sounds which aren't
|
||||
// captured through server sound hooking
|
||||
|
||||
|
||||
if (playerIndex < 0 || playerIndex >= GetMaxClients ())
|
||||
return; // reliability check
|
||||
|
||||
|
|
@ -1373,17 +1375,17 @@ void SoundSimulateUpdate (int playerIndex)
|
|||
|
||||
if (client->ent->v.oldbuttons & IN_ATTACK) // pressed attack button?
|
||||
{
|
||||
hearDistance = 3072.0;
|
||||
hearDistance = 2048.0f;
|
||||
timeSound = GetWorldTime () + 0.3f;
|
||||
}
|
||||
else if (client->ent->v.oldbuttons & IN_USE) // pressed used button?
|
||||
{
|
||||
hearDistance = 512.0;
|
||||
hearDistance = 512.0f;
|
||||
timeSound = GetWorldTime () + 0.5f;
|
||||
}
|
||||
else if (client->ent->v.oldbuttons & IN_RELOAD) // pressed reload button?
|
||||
{
|
||||
hearDistance = 512.0;
|
||||
hearDistance = 512.0f;
|
||||
timeSound = GetWorldTime () + 0.5f;
|
||||
}
|
||||
else if (client->ent->v.movetype == MOVETYPE_FLY) // uses ladder?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue