mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-22 07:55:43 +00:00
fix possible bug
This commit is contained in:
parent
53ddef6a69
commit
c996bd9fe7
@ -1569,16 +1569,18 @@ doWalk(goal, dist, isScriptGoal)
|
|||||||
*/
|
*/
|
||||||
movetowards(goal)
|
movetowards(goal)
|
||||||
{
|
{
|
||||||
if(isDefined(goal))
|
if(!isDefined(goal))
|
||||||
|
return;
|
||||||
|
|
||||||
self.bot.towards_goal = goal;
|
self.bot.towards_goal = goal;
|
||||||
|
|
||||||
lastOri = self.origin;
|
lastOri = self.origin;
|
||||||
stucks = 0;
|
stucks = 0;
|
||||||
timeslow = 0;
|
timeslow = 0;
|
||||||
time = 0;
|
time = 0;
|
||||||
while(distanceSquared(self.origin, self.bot.towards_goal) > level.bots_goalDistance)
|
while(distanceSquared(self.origin, goal) > level.bots_goalDistance)
|
||||||
{
|
{
|
||||||
self botMoveTo(self.bot.towards_goal);
|
self botMoveTo(goal);
|
||||||
|
|
||||||
if(time > 2.5)
|
if(time > 2.5)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user