mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-04-26 07:34:50 +00:00
added buttons
This commit is contained in:
parent
3270e04d82
commit
442dd97a2d
@ -2364,18 +2364,45 @@ botWeapon(weap)
|
|||||||
|
|
||||||
botAction(act)
|
botAction(act)
|
||||||
{
|
{
|
||||||
buttons = 0;
|
if (!isDefined(level.bot_buttons))
|
||||||
switch (act)
|
{
|
||||||
{
|
level.bot_buttons = [];
|
||||||
case "+ads":
|
|
||||||
case "-ads":
|
level.bot_buttons["+ads"] = (524288) | (2048);
|
||||||
buttons = (524288) | (2048);
|
level.bot_buttons["-ads"] = (524288) | (2048);
|
||||||
break;
|
|
||||||
case "+fire":
|
level.bot_buttons["+fire"] = 1;
|
||||||
case "-fire":
|
level.bot_buttons["-fire"] = 1;
|
||||||
buttons = 1;
|
|
||||||
break;
|
level.bot_buttons["+sprint"] = 2;
|
||||||
}
|
level.bot_buttons["-sprint"] = 2;
|
||||||
|
|
||||||
|
level.bot_buttons["+melee"] = 4;
|
||||||
|
level.bot_buttons["-melee"] = 4;
|
||||||
|
|
||||||
|
level.bot_buttons["+frag"] = 16384;
|
||||||
|
level.bot_buttons["-frag"] = 16384;
|
||||||
|
|
||||||
|
level.bot_buttons["+reload"] = 16;
|
||||||
|
level.bot_buttons["-reload"] = 16;
|
||||||
|
|
||||||
|
level.bot_buttons["+smoke"] = 32768;
|
||||||
|
level.bot_buttons["-smoke"] = 32768;
|
||||||
|
|
||||||
|
level.bot_buttons["+holdbreath"] = 8192;
|
||||||
|
level.bot_buttons["-holdbreath"] = 8192;
|
||||||
|
|
||||||
|
level.bot_buttons["+gostand"] = 1024;
|
||||||
|
level.bot_buttons["-gostand"] = 1024;
|
||||||
|
|
||||||
|
level.bot_buttons["+gocrouch"] = 512;
|
||||||
|
level.bot_buttons["-gocrouch"] = 512;
|
||||||
|
|
||||||
|
level.bot_buttons["+goprone"] = 256;
|
||||||
|
level.bot_buttons["-goprone"] = 256;
|
||||||
|
}
|
||||||
|
|
||||||
|
buttons = level.bot_buttons[act];
|
||||||
|
|
||||||
if (act[0] == "+")
|
if (act[0] == "+")
|
||||||
setDvar("bot" + self getEntityNumber() + "_buttons", getDvarInt("bot" + self getEntityNumber() + "_buttons") | buttons);
|
setDvar("bot" + self getEntityNumber() + "_buttons", getDvarInt("bot" + self getEntityNumber() + "_buttons") | buttons);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user