mirror of
https://github.com/JezuzLizard/t4sp_bot_warfare.git
synced 2025-04-20 05:25:44 +00:00
fix
This commit is contained in:
parent
01dcaaff95
commit
2bd494c8d7
@ -1309,12 +1309,15 @@ aim_loop()
|
|||||||
self thread bot_lookat( aimpos, aimspeed );
|
self thread bot_lookat( aimpos, aimspeed );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isActor && !self.bot.isknifingafter && conedot > 0.9 && dist < level.bots_maxKnifeDistance && trace_time > reaction_time && !self.bot.isreloading && getDvarInt( "bots_play_knife" ) )
|
if ( isActor && !self.bot.isknifingafter && conedot > 0.9 && dist < level.bots_maxKnifeDistance && trace_time > reaction_time && getDvarInt( "bots_play_knife" ) )
|
||||||
|
{
|
||||||
|
if ( self canFire( curweap ) || !self getAmmoCount( curweap ) )
|
||||||
{
|
{
|
||||||
self clear_bot_after_target();
|
self clear_bot_after_target();
|
||||||
self thread knife();
|
self thread knife();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !self canFire( curweap ) || !self isInRange( dist, curweap ) )
|
if ( !self canFire( curweap ) || !self isInRange( dist, curweap ) )
|
||||||
return;
|
return;
|
||||||
@ -1544,6 +1547,7 @@ doWalk( goal, dist, isScriptGoal )
|
|||||||
|
|
||||||
//Couldn't generate path to goal
|
//Couldn't generate path to goal
|
||||||
self.bot.path_inaccessible = false;
|
self.bot.path_inaccessible = false;
|
||||||
|
|
||||||
if ( current <= -1 )
|
if ( current <= -1 )
|
||||||
{
|
{
|
||||||
self.bot.path_inaccessible = true;
|
self.bot.path_inaccessible = true;
|
||||||
@ -1770,6 +1774,7 @@ initAStar( goal )
|
|||||||
{
|
{
|
||||||
//Try again to find a path to the origin using best effort algo
|
//Try again to find a path to the origin using best effort algo
|
||||||
nodes = generatePath( self.origin, goal, self.team, level.bot_allowed_negotiation_links, 192.0 );
|
nodes = generatePath( self.origin, goal, self.team, level.bot_allowed_negotiation_links, 192.0 );
|
||||||
|
|
||||||
if ( !isDefined( nodes ) )
|
if ( !isDefined( nodes ) )
|
||||||
{
|
{
|
||||||
self.bot.astar = [];
|
self.bot.astar = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user