mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-22 18:25:44 +00:00
Added ads dvar
This commit is contained in:
parent
a8962056d1
commit
8821026afd
@ -135,6 +135,7 @@ Pressing the menu button again closes menus.
|
||||
- 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_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
|
||||
|
||||
---
|
||||
|
||||
|
@ -79,6 +79,8 @@ init()
|
||||
setDvar("bots_play_target_other", true);
|
||||
if(getDvar("bots_play_killstreak") == "")//bot use killstreaks
|
||||
setDvar("bots_play_killstreak", true);
|
||||
if(getDvar("bots_play_ads") == "")//bot ads
|
||||
setDvar("bots_play_ads", true);
|
||||
|
||||
if(!isDefined(game["botWarfare"]))
|
||||
game["botWarfare"] = true;
|
||||
|
@ -1177,6 +1177,9 @@ canAds(dist, curweap)
|
||||
if(curweap == "none")
|
||||
return false;
|
||||
|
||||
if (!getDvarInt("bots_play_ads"))
|
||||
return false;
|
||||
|
||||
far = level.bots_noADSDistance;
|
||||
if(self hasPerk("specialty_bulletaccuracy"))
|
||||
far *= 1.4;
|
||||
|
@ -762,6 +762,13 @@ AddOptions()
|
||||
else
|
||||
_temp = "false";
|
||||
self AddMenu("set1", 10, "Bots can use killstreaks: "+_temp, ::bot_func, "killstreak", _tempDvar);
|
||||
|
||||
_tempDvar = getDvarInt("bots_play_ads");
|
||||
if(_tempDvar)
|
||||
_temp = "true";
|
||||
else
|
||||
_temp = "false";
|
||||
self AddMenu("set1", 11, "Bots can ads: "+_temp, ::bot_func, "ads", _tempDvar);
|
||||
}
|
||||
|
||||
bot_func(a, b)
|
||||
@ -812,6 +819,10 @@ bot_func(a, b)
|
||||
setDvar("bots_play_killstreak", !b);
|
||||
self iPrintln("Bots use killstreaks: " + !b);
|
||||
break;
|
||||
case "ads":
|
||||
setDvar("bots_play_ads", !b);
|
||||
self iPrintln("Bots ads: " + !b);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user