When using pathfinding byond will work as intended for any empty turf (no obj/mob/movable on the tile)
The moment anything is on said tile it will flip pathfinding to ignore density, this leads to clashing against a dense object. This remains this way until I restart the game. This pathfinding bug seems to occur with also using the obj/mob as the Trg directly
I see a similar bug report from @ http://www.byond.com/forum/post/2518727 that says minimizing will eventually flip it back to the correct method
It doesnt seem to fully break as it can still go around some objects nearby but may be a distance thing being ignored. This distance thing works as intended prior to trying to walk_to the filled turf
Id be happy to supply a source to reproduce and/or sit down and show you
https://www.dropbox.com/s/o1k0kurfjykwlck/ Pathfinding.rar?dl=0
Numbered Steps to Reproduce Problem:
- Use walk_to (or step_to in a loop)
- Set the Trg to any turf with anything inside OR a mob/obj directly
Code Snippet (if applicable) to Reproduce Problem:
Follow_Step(mob/M in world)
while(get_dist(usr,M)>1)
if(step_to(usr,M))
sleep(1)
else
break
GoTo_Step(turf/T in world)
while(get_dist(usr,T)>1)
if(step_to(usr,T))
sleep(1)
else
break
GoTo_Walk(turf/T in world)
walk_to(usr,T)
StepTest()
var/turf/T = locate(/turf/Finish) in world
while(get_dist(usr,T)>1)
if(step_to(usr,T))
sleep(1)
else
break
WalkTest()
walk_to(usr,locate(/turf/Finish))
Restart()
src.loc = locate(/turf/Start) in world
Expected Results:
usr/mob should pathfind around the dense objects
Actual Results:
usr/mob clash against the dense objects instead of pathfinding around them
Does the problem occur:
Every time? Or how often?
Everytime
In other games?
I have tried this on 3 of my sources now
In other user accounts?
Guest, and other keys
On other computers?
reproduced by others I asked to test
When does the problem NOT occur?
When i walk_to/step_to a turf with nothing in it
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
Have not tried but guessing on the earlier report it seems it occured then as well
Workarounds:
None found
I'll look into updating this logic. I think it could be a lot better.