mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-23 06:15:43 +00:00
add check
This commit is contained in:
parent
73a7f1dfec
commit
7c078f82ea
@ -2301,6 +2301,13 @@ do_knife_target( target )
|
|||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
self endon( "bot_knife" );
|
self endon( "bot_knife" );
|
||||||
|
|
||||||
|
if ( !getDvarInt( "aim_automelee_enabled" ) || !self isOnGround() || self GetStance() == "prone" || self InLastStand() )
|
||||||
|
{
|
||||||
|
self.bot.knifing_target = undefined;
|
||||||
|
self BotBuiltinBotMeleeParams( 0, 0 );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !isDefined( target ) || !isPlayer( target ) )
|
if ( !isDefined( target ) || !isPlayer( target ) )
|
||||||
{
|
{
|
||||||
self.bot.knifing_target = undefined;
|
self.bot.knifing_target = undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user