mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-04-25 23:29:12 +00:00
Fix doubletabs with alt weap
This commit is contained in:
parent
2e05a2f6d7
commit
45d302cd2b
@ -4171,6 +4171,7 @@ bot_crate_think()
|
|||||||
*/
|
*/
|
||||||
doReloadCancel_loop()
|
doReloadCancel_loop()
|
||||||
{
|
{
|
||||||
|
curWeap = self GetCurrentWeapon();
|
||||||
ret = self waittill_either_return( "reload", "weapon_change" );
|
ret = self waittill_either_return( "reload", "weapon_change" );
|
||||||
|
|
||||||
if ( self BotIsFrozen() )
|
if ( self BotIsFrozen() )
|
||||||
@ -4185,11 +4186,18 @@ doReloadCancel_loop()
|
|||||||
if ( self InLastStand() && !self InFinalStand() )
|
if ( self InLastStand() && !self InFinalStand() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
curWeap = self GetCurrentWeapon();
|
if ( !getDvarInt( "sv_enableDoubleTaps" ) )
|
||||||
|
|
||||||
if ( getDvar( "sv_enableDoubleTaps" ) == "0" )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// wait for an actual change
|
||||||
|
if ( ret == "weapon_change" )
|
||||||
|
{
|
||||||
|
for ( i = 0; i < 10 && curWeap == self GetCurrentWeapon(); i++ )
|
||||||
|
wait 0.05;
|
||||||
|
}
|
||||||
|
|
||||||
|
curWeap = self GetCurrentWeapon();
|
||||||
|
|
||||||
if ( !maps\mp\gametypes\_weapons::isPrimaryWeapon( curWeap ) )
|
if ( !maps\mp\gametypes\_weapons::isPrimaryWeapon( curWeap ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user