mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 22:05:44 +00:00
oops lol
This commit is contained in:
parent
18a7758bbf
commit
7534becb9e
@ -1328,13 +1328,13 @@ nearAnyOfWaypoints(dist, waypoints)
|
||||
getNearestWaypointOfWaypoints(waypoints)
|
||||
{
|
||||
answer = undefined;
|
||||
closestDist = -1;
|
||||
closestDist = 999999999999;
|
||||
for (i = 0; i < waypoints.size; i++)
|
||||
{
|
||||
waypoint = waypoints[i];
|
||||
thisDist = DistanceSquared(self.origin, waypoint.origin);
|
||||
|
||||
if (isDefined(answer) && thisDist < closestDist)
|
||||
if (thisDist > closestDist)
|
||||
continue;
|
||||
|
||||
answer = waypoint;
|
||||
|
@ -33,14 +33,5 @@ test()
|
||||
|
||||
if (self is_bot())
|
||||
continue;
|
||||
|
||||
myOrg = self.origin;
|
||||
myOrg = (myOrg[0], myOrg[1], 0);
|
||||
myAngles = self GetPlayerAngles();
|
||||
myAngles = (0, myAngles[1], 0);
|
||||
myVelocity = self GetVelocity();
|
||||
myVelocity = (myVelocity[0], myVelocity[1], 0);
|
||||
|
||||
self sayall(GetConeDot(myOrg + myVelocity, myOrg, myAngles));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user