minor improvement to sprint

This commit is contained in:
ineedbots 2021-07-29 13:38:53 -06:00
parent d9a8ac04c4
commit cae032eb9a

View File

@ -1909,7 +1909,12 @@ movetowards( goal )
timeslow = 0; timeslow = 0;
time = 0; time = 0;
while ( distanceSquared( self.origin, goal ) > level.bots_goalDistance ) if ( self.bot.issprinting )
tempGoalDist = level.bots_goalDistance * 2;
else
tempGoalDist = level.bots_goalDistance;
while ( distanceSquared( self.origin, goal ) > tempGoalDist )
{ {
self botMoveTo( goal ); self botMoveTo( goal );
@ -1951,6 +1956,11 @@ movetowards( goal )
else else
timeslow = 0; timeslow = 0;
if ( self.bot.issprinting )
tempGoalDist = level.bots_goalDistance * 2;
else
tempGoalDist = level.bots_goalDistance;
if ( stucks == 2 ) if ( stucks == 2 )
self notify( "bad_path_internal" ); self notify( "bad_path_internal" );
} }