bot: ignoring some parameters for throwing grenades (#488)
add: cvar "yv_grenadier_mode" bot will ignore throwing grenade condition if enabled
This commit is contained in:
parent
c5e233304d
commit
8c60149c70
4 changed files with 29 additions and 6 deletions
|
|
@ -1084,8 +1084,8 @@ void Bot::throwExplosive_ () {
|
|||
|
||||
ignoreCollision ();
|
||||
|
||||
if (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 (m_grenade.lengthSq () <= 100.0f) {
|
||||
if (!game.mapIs(MapFlags::GrenadeWar) && (m_grenade.lengthSq () <= 100.0f)) {
|
||||
m_grenadeCheckTime = game.time () + kGrenadeCheckTime * 2.0f;
|
||||
|
||||
selectBestWeapon ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue