mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2025-04-23 07:25:43 +00:00
cleanup
This commit is contained in:
parent
551e66fb21
commit
35064a1776
@ -593,7 +593,6 @@ createTargetObj( ent, theTime )
|
|||||||
obj.trace_time_time = 0;
|
obj.trace_time_time = 0;
|
||||||
obj.rand = randomInt( 100 );
|
obj.rand = randomInt( 100 );
|
||||||
obj.didlook = false;
|
obj.didlook = false;
|
||||||
obj.isplay = isPlayer( ent );
|
|
||||||
obj.offset = undefined;
|
obj.offset = undefined;
|
||||||
obj.bone = undefined;
|
obj.bone = undefined;
|
||||||
obj.aim_offset = undefined;
|
obj.aim_offset = undefined;
|
||||||
@ -910,7 +909,7 @@ onNewEnemy()
|
|||||||
if ( !isDefined( self.bot.target ) )
|
if ( !isDefined( self.bot.target ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( !isDefined( self.bot.target.entity ) || !self.bot.target.isplay )
|
if ( !isDefined( self.bot.target.entity ) || !isPlayer( self.bot.target.entity ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( self.bot.target.didlook )
|
if ( self.bot.target.didlook )
|
||||||
@ -1049,7 +1048,7 @@ aim_loop()
|
|||||||
last_pos = self.bot.target.last_seen_pos;
|
last_pos = self.bot.target.last_seen_pos;
|
||||||
target = self.bot.target.entity;
|
target = self.bot.target.entity;
|
||||||
conedot = 0;
|
conedot = 0;
|
||||||
isplay = self.bot.target.isplay;
|
isplay = isPlayer( self.bot.target.entity );
|
||||||
|
|
||||||
offset = self.bot.target.offset;
|
offset = self.bot.target.offset;
|
||||||
|
|
||||||
@ -1404,7 +1403,7 @@ walk_loop()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( self.bot.target.isplay && self.bot.target.trace_time && self canFire( curweap ) && self isInRange( self.bot.target.dist, curweap ) )
|
if ( isPlayer( self.bot.target.entity ) && self.bot.target.trace_time && self canFire( curweap ) && self isInRange( self.bot.target.dist, curweap ) )
|
||||||
{
|
{
|
||||||
if ( self GetStance() == "prone" || ( self.bot.is_cur_sniper && self PlayerADS() > 0 ) )
|
if ( self GetStance() == "prone" || ( self.bot.is_cur_sniper && self PlayerADS() > 0 ) )
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user