mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-04-25 23:29:12 +00:00
added buttons
This commit is contained in:
parent
3270e04d82
commit
442dd97a2d
@ -2364,19 +2364,46 @@ botWeapon(weap)
|
||||
|
||||
botAction(act)
|
||||
{
|
||||
buttons = 0;
|
||||
switch (act)
|
||||
if (!isDefined(level.bot_buttons))
|
||||
{
|
||||
case "+ads":
|
||||
case "-ads":
|
||||
buttons = (524288) | (2048);
|
||||
break;
|
||||
case "+fire":
|
||||
case "-fire":
|
||||
buttons = 1;
|
||||
break;
|
||||
level.bot_buttons = [];
|
||||
|
||||
level.bot_buttons["+ads"] = (524288) | (2048);
|
||||
level.bot_buttons["-ads"] = (524288) | (2048);
|
||||
|
||||
level.bot_buttons["+fire"] = 1;
|
||||
level.bot_buttons["-fire"] = 1;
|
||||
|
||||
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] == "+")
|
||||
setDvar("bot" + self getEntityNumber() + "_buttons", getDvarInt("bot" + self getEntityNumber() + "_buttons") | buttons);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user