I've noticed, in some situations, that waypoints get skipped when they shouldn't.
I've now done a few tests to see under what conditions this happens. I've found 2.
1st. When you use loadpaths you get a message saying something like "Point #3 is closer than Point #1 so we will start with point #3". The point 3 would be the closest but it goes to the next point instead, skipping 3 altogether.
2nd. When using __WPL:setWaypointIndex(9), instead of going to waypoint 9 it goes to 10.
In both these situations you should always go to the closest waypoint first. I'm not sure why it skips them.
I know that in most waypoint files this wont cause too much trouble but there are situations where it can completely screw up the planned progression of your waypoint files.
I hope this can be fixed.
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
That should get you moving to the closest waypoint properly. Let me know if this works.
The CWaypoint:setWaypointIndex() is working as intended. It's not to set which waypoint you want to move to, but rather, which waypoint you are moving from.
That should get you moving to the closest waypoint properly. Let me know if this works.
Seems to work, yes. Thank you.
Administrator wrote:The CWaypoint:setWaypointIndex() is working as intended. It's not to set which waypoint you want to move to, but rather, which waypoint you are moving from.
The bot will always try to move to __WPL:getNextWaypoint(), which is CurrentIndex + 1. To change that would require a lot of editing. It might not seem like a big deal, but remember that there are several times when it would need to return to the last reached waypoint rather than continue forward. It could cause a lot of unforseen bugs to change just CWaypointList:getNextWaypoint() and __WPL:setWaypointIndex().
It's easier to just work around it so that we don't have to worry about fixing any additional bugs. A new function specifically for this could be added, though:
Administrator wrote:It's easier to just work around it so that we don't have to worry about fixing any additional bugs. A new function specifically for this could be added, though:
That should get you moving to the closest waypoint properly. Let me know if this works.
Seems to work, yes. Thank you.
I spoke too soon. With this fix it correctly moves to the closest waypoint when using loadpaths but when you start the first waypoint file it moves to the closest point -1 first.
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
As stated in the above post, when 1 waypoint file loads another waypoint file with the loadpaths command then it correctly moves to the closest point but when you load your first waypoint file it starts from the point before the closest point.
So in fixing loadpaths you broke loading the first file which was working correctly in revision 430.
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.