mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 22:05:44 +00:00
fix infite loop
This commit is contained in:
parent
b1579c0b3e
commit
658dac613f
@ -438,18 +438,27 @@ checkForWarnings()
|
|||||||
|
|
||||||
if(level.waypoints[i].childCount <= 0)
|
if(level.waypoints[i].childCount <= 0)
|
||||||
self iprintln("WARNING: waypoint "+i+" childCount is "+level.waypoints[i].childCount);
|
self iprintln("WARNING: waypoint "+i+" childCount is "+level.waypoints[i].childCount);
|
||||||
|
else
|
||||||
if(level.waypoints[i].childCount != level.waypoints[i].children.size)
|
|
||||||
self iprintln("WARNING: waypoint "+i+" childCount is not "+level.waypoints[i].children.size);
|
|
||||||
|
|
||||||
for (h = 0; h < level.waypoints[i].childCount; h++)
|
|
||||||
{
|
{
|
||||||
child = level.waypoints[i].children[h];
|
if (!isDefined(level.waypoints[i].children) || !isDefined(level.waypoints[i].children.size))
|
||||||
|
{
|
||||||
|
self iprintln("WARNING: waypoint "+i+" children is not defined");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(level.waypoints[i].childCount != level.waypoints[i].children.size)
|
||||||
|
self iprintln("WARNING: waypoint "+i+" childCount is not "+level.waypoints[i].children.size);
|
||||||
|
|
||||||
|
for (h = 0; h < level.waypoints[i].childCount; h++)
|
||||||
|
{
|
||||||
|
child = level.waypoints[i].children[h];
|
||||||
|
|
||||||
if(!isDefined(level.waypoints[child]))
|
if(!isDefined(level.waypoints[child]))
|
||||||
self iprintln("WARNING: waypoint "+i+" child "+child+" is undefined");
|
self iprintln("WARNING: waypoint "+i+" child "+child+" is undefined");
|
||||||
else if(child == i)
|
else if(child == i)
|
||||||
self iprintln("WARNING: waypoint "+i+" child "+child+" is itself");
|
self iprintln("WARNING: waypoint "+i+" child "+child+" is itself");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isDefined(level.waypoints[i].type))
|
if(!isDefined(level.waypoints[i].type))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user