mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-23 02:35:43 +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_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
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -79,6 +79,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;
|
||||||
|
@ -1177,6 +1177,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;
|
||||||
|
@ -762,6 +762,13 @@ AddOptions()
|
|||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
self AddMenu("set1", 10, "Bots can use killstreaks: "+_temp, ::bot_func, "killstreak", _tempDvar);
|
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)
|
bot_func(a, b)
|
||||||
@ -812,6 +819,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user