Skretzo / shortest-path

Pathfinding for Old School RuneScape
BSD 2-Clause "Simplified" License
14 stars 27 forks source link

Not all transports have a wait time #61

Open botuser420 opened 7 months ago

botuser420 commented 7 months ago

I noticed a lot of regular transports don't have a wait time added. Is this intentional or you just didn't get to it yet? If it's the latter I can make a pr with all the missing ones set to 1. Amazing plugin from a technical/hobby standpoint btw <3

Skretzo commented 7 months ago

I noticed a lot of regular transports don't have a wait time added

I didn't get to it yet.

I can make a pr with all the missing ones set to 1

I would rather add them slowly one by one instead of setting them to 1 tick which is most likely wrong. It defaults to 0 ticks anyway, so not much difference and you probably don't get a wrong path unless the travel wait time is like 10+ ticks. Most doors are probably 1 tick, but it seems ladders are usually 2 ticks. Also, if I were to assume that people are running (which they probably are) then it would probably be more correct with 2 ticks for doors and 3 ticks for ladders instead because you are forced to stop and restart running.

botuser420 commented 7 months ago

Thanks for the quick reply. I just spotted https://github.com/Skretzo/shortest-path/blob/9a9667c29fcdf437d9b2ddd1e0dde498ec7eb89c/src/main/java/shortestpath/pathfinder/Node.java#L68 so for things like doors that have their origin and destination next to each other it will use a wait of 1, regardless of what it's set to (if I understand correctly). I completely understand and appreciate you'd rather set the wait times correct the first time. Keep up the good work.