mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-04-19 16:32:53 +00:00
Can switch to altmode with spawnweapon hack
This commit is contained in:
parent
00dfc54988
commit
01eebf6a8c
@ -688,6 +688,9 @@ changeToWeapon(weap)
|
||||
|
||||
self SwitchToWeapon(weap);
|
||||
|
||||
if (isWeaponAltmode(weap))
|
||||
self setSpawnWeapon(weap);
|
||||
|
||||
self waittill_any_timeout(5, "weapon_change");
|
||||
|
||||
return (self GetCurrentWeapon() == weap);
|
||||
@ -2530,7 +2533,6 @@ follow_target()
|
||||
|
||||
/*
|
||||
Fast swaps or reload cancels don't work cause t5 bots wait for the anim to complete
|
||||
t5 bots cannot switch to altmode
|
||||
Bots will think to switch weapons
|
||||
*/
|
||||
bot_weapon_think()
|
||||
|
@ -145,6 +145,25 @@ GetBotDiffNum()
|
||||
return num;
|
||||
}
|
||||
|
||||
/*
|
||||
is the weapon alt mode?
|
||||
*/
|
||||
isWeaponAltmode(weap)
|
||||
{
|
||||
if (isStrStart(weap, "gl_") || isStrStart(weap, "ft_") || isStrStart(weap, "mk_"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
If the string starts with
|
||||
*/
|
||||
isStrStart( string1, subStr )
|
||||
{
|
||||
return ( getSubStr( string1, 0, subStr.size ) == subStr );
|
||||
}
|
||||
|
||||
/*
|
||||
Taken from iw4 script
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user