bot: return of the cheat cvar yb_whose_your_daddy (resolved #513)

combat: resolve strafe movement issues
combat: resolve bots always standing still with pistols and shotguns
vision: take a look at recent victim for some time before changing view angles
control: allow bots to be killed silently (ref #514) via commands
control: bots that are killed with auto kill timer are now killed silently
This commit is contained in:
jeefo 2024-01-29 08:08:07 +03:00
commit d82124e595
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
14 changed files with 150 additions and 62 deletions

View file

@ -1084,8 +1084,8 @@ void Bot::throwExplosive_ () {
ignoreCollision ();
if (!game.mapIs(MapFlags::GrenadeWar) && (pev->origin.distanceSq (dest) < cr::sqrf (450.0f))) {
// heck, I don't wanna blow up myself
if (!game.mapIs (MapFlags::GrenadeWar) && (pev->origin.distanceSq (dest) < cr::sqrf (450.0f))) {
// heck, I don't wanna blow up myself
m_grenadeCheckTime = game.time () + kGrenadeCheckTime * 2.0f;
selectBestWeapon ();
@ -1099,7 +1099,7 @@ void Bot::throwExplosive_ () {
m_grenade = calcToss (pev->origin, dest);
}
if (!game.mapIs(MapFlags::GrenadeWar) && (m_grenade.lengthSq () <= 100.0f)) {
if (!game.mapIs (MapFlags::GrenadeWar) && (m_grenade.lengthSq () <= 100.0f)) {
m_grenadeCheckTime = game.time () + kGrenadeCheckTime * 2.0f;
selectBestWeapon ();