fixed bot's don't shoot at near-zero distance [need testing]
This commit is contained in:
parent
2907787619
commit
e9d826ccea
4 changed files with 9 additions and 14 deletions
|
|
@ -1431,11 +1431,6 @@ public:
|
||||||
m_deathMsgSent = sent;
|
m_deathMsgSent = sent;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool GetDeathMsgState (void)
|
|
||||||
{
|
|
||||||
return m_deathMsgSent;
|
|
||||||
}
|
|
||||||
|
|
||||||
// grenades
|
// grenades
|
||||||
void UpdateActiveGrenades (void);
|
void UpdateActiveGrenades (void);
|
||||||
const Array <entity_t> &GetActiveGrenades (void);
|
const Array <entity_t> &GetActiveGrenades (void);
|
||||||
|
|
|
||||||
|
|
@ -1002,11 +1002,11 @@ void Bot::FocusEnemy (void)
|
||||||
{
|
{
|
||||||
if (m_currentWeapon == WEAPON_KNIFE)
|
if (m_currentWeapon == WEAPON_KNIFE)
|
||||||
{
|
{
|
||||||
if (distance <= 80.0f)
|
if (distance < 80.0f)
|
||||||
m_wantsToFire = true;
|
m_wantsToFire = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_wantsToFire = GetShootingConeDeviation (GetEntity (), &m_enemyOrigin) > 0.8f;
|
m_wantsToFire = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1423,16 +1423,16 @@ void BotManager::SendPingDataOffsets (edict_t *to)
|
||||||
{
|
{
|
||||||
// start a new message
|
// start a new message
|
||||||
MESSAGE_BEGIN (MSG_ONE_UNRELIABLE, SVC_PINGS, NULL, to);
|
MESSAGE_BEGIN (MSG_ONE_UNRELIABLE, SVC_PINGS, NULL, to);
|
||||||
WRITE_BYTE ((m_bots[i]->m_pingOffset[sending] * 64) + (1 + 2 * i));
|
WRITE_BYTE ((bot->m_pingOffset[sending] * 64) + (1 + 2 * i));
|
||||||
WRITE_SHORT (m_bots[i]->m_ping[sending]);
|
WRITE_SHORT (bot->m_ping[sending]);
|
||||||
|
|
||||||
sending++;
|
sending++;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
// append additional data
|
// append additional data
|
||||||
WRITE_BYTE ((m_bots[i]->m_pingOffset[sending] * 128) + (2 + 4 * i));
|
WRITE_BYTE ((bot->m_pingOffset[sending] * 128) + (2 + 4 * i));
|
||||||
WRITE_SHORT (m_bots[i]->m_ping[sending]);
|
WRITE_SHORT (bot->m_ping[sending]);
|
||||||
|
|
||||||
sending++;
|
sending++;
|
||||||
}
|
}
|
||||||
|
|
@ -1440,7 +1440,7 @@ void BotManager::SendPingDataOffsets (edict_t *to)
|
||||||
{
|
{
|
||||||
// append additional data and end message
|
// append additional data and end message
|
||||||
WRITE_BYTE (4 + 8 * i);
|
WRITE_BYTE (4 + 8 * i);
|
||||||
WRITE_SHORT (m_bots[i]->m_ping[sending]);
|
WRITE_SHORT (bot->m_ping[sending]);
|
||||||
WRITE_BYTE (0);
|
WRITE_BYTE (0);
|
||||||
MESSAGE_END ();
|
MESSAGE_END ();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue