combat: throw explosive near friends when friendly fire is off

This commit is contained in:
jeefo 2024-02-15 05:04:02 +03:00
commit c0715714d6
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -2018,7 +2018,7 @@ void Bot::checkGrenadesThrow () {
// care about different grenades
switch (grenadeToThrow) {
case Weapon::Explosive:
if (numFriendsNear (m_lastEnemy->v.origin, 256.0f) > 0) {
if (mp_friendlyfire.bool_ () && numFriendsNear (m_lastEnemy->v.origin, 256.0f) > 0) {
allowThrowing = false;
}
else {