Added ads dvar

This commit is contained in:
INeedBots 2020-12-13 16:47:52 -06:00
parent 376382b17e
commit b1579c0b3e
4 changed files with 17 additions and 0 deletions

View File

@ -136,6 +136,7 @@ You can find the ModDB release post [here](https://www.moddb.com/mods/bot-warfar
- bots_play_jumpdrop - a boolean value (0 or 1), whether or not if the bots will jump shot or drop shot - bots_play_jumpdrop - a boolean value (0 or 1), whether or not if the bots will jump shot or drop shot
- bots_play_target_other - a boolean value (0 or 1), whether or not if the bots will target claymores, killstreaks, etc. - bots_play_target_other - a boolean value (0 or 1), whether or not if the bots will target claymores, killstreaks, etc.
- bots_play_killstreak - a boolean value (0 or 1), whether or not if the bots will use killstreaks - bots_play_killstreak - a boolean value (0 or 1), whether or not if the bots will use killstreaks
- bots_play_ads - a boolean value (0 or 1), whether or not if the bots will ads
--- ---

View File

@ -87,6 +87,8 @@ init()
setDvar("bots_play_target_other", true); setDvar("bots_play_target_other", true);
if(getDvar("bots_play_killstreak") == "")//bot use killstreaks if(getDvar("bots_play_killstreak") == "")//bot use killstreaks
setDvar("bots_play_killstreak", true); setDvar("bots_play_killstreak", true);
if(getDvar("bots_play_ads") == "")//bot ads
setDvar("bots_play_ads", true);
if(!isDefined(game["botWarfare"])) if(!isDefined(game["botWarfare"]))
game["botWarfare"] = true; game["botWarfare"] = true;

View File

@ -1350,6 +1350,9 @@ canAds(dist, curweap)
if(curweap == "none") if(curweap == "none")
return false; return false;
if (!getDvarInt("bots_play_ads"))
return false;
far = level.bots_noADSDistance; far = level.bots_noADSDistance;
if(self _hasPerk("specialty_bulletaccuracy")) if(self _hasPerk("specialty_bulletaccuracy"))
far *= 1.4; far *= 1.4;

View File

@ -773,6 +773,13 @@ AddOptions()
else else
_temp = "false"; _temp = "false";
self AddMenu("set1", 11, "Bots can use killstreaks: "+_temp, ::bot_func, "killstreak", _tempDvar); self AddMenu("set1", 11, "Bots can use killstreaks: "+_temp, ::bot_func, "killstreak", _tempDvar);
_tempDvar = getDvarInt("bots_play_ads");
if(_tempDvar)
_temp = "true";
else
_temp = "false";
self AddMenu("set1", 12, "Bots can ads: "+_temp, ::bot_func, "ads", _tempDvar);
} }
bot_func(a, b) bot_func(a, b)
@ -827,6 +834,10 @@ bot_func(a, b)
setDvar("bots_play_killstreak", !b); setDvar("bots_play_killstreak", !b);
self iPrintln("Bots use killstreaks: " + !b); self iPrintln("Bots use killstreaks: " + !b);
break; break;
case "ads":
setDvar("bots_play_ads", !b);
self iPrintln("Bots ads: " + !b);
break;
} }
} }