mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-23 06:15:43 +00:00
oops lol
This commit is contained in:
parent
18a7758bbf
commit
7534becb9e
@ -1328,13 +1328,13 @@ nearAnyOfWaypoints(dist, waypoints)
|
|||||||
getNearestWaypointOfWaypoints(waypoints)
|
getNearestWaypointOfWaypoints(waypoints)
|
||||||
{
|
{
|
||||||
answer = undefined;
|
answer = undefined;
|
||||||
closestDist = -1;
|
closestDist = 999999999999;
|
||||||
for (i = 0; i < waypoints.size; i++)
|
for (i = 0; i < waypoints.size; i++)
|
||||||
{
|
{
|
||||||
waypoint = waypoints[i];
|
waypoint = waypoints[i];
|
||||||
thisDist = DistanceSquared(self.origin, waypoint.origin);
|
thisDist = DistanceSquared(self.origin, waypoint.origin);
|
||||||
|
|
||||||
if (isDefined(answer) && thisDist < closestDist)
|
if (thisDist > closestDist)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
answer = waypoint;
|
answer = waypoint;
|
||||||
|
@ -33,14 +33,5 @@ test()
|
|||||||
|
|
||||||
if (self is_bot())
|
if (self is_bot())
|
||||||
continue;
|
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