ID:2950898
 
Resolved
Regression: Pathfinding changes in the previous version prevented walkers from reaching their targets in certain movement modes.
BYOND Version:515
Operating System:Windows 11 Pro
Web Browser:Firefox 132.0
Applies to:Dream Daemon
Status: Resolved (515.1646)

This issue has been resolved.
Descriptive Problem Summary:
When running the game under any version below 1645, there's no issue with calling step_to(mob2, mob1) and the mob will move on top (density set to false for the target)

Numbered Steps to Reproduce Problem:
-> Update / install byond 1645
-> have 2 mobs
-> have 1 without density
-> step_to from the mob with density to the one without

Code Snippet (if applicable) to Reproduce Problem:
/proc/main()
var/mob/mob1 = new(locate(1,1,1))
var/mob/mob2 = new(locate(2,1,1))
mob1.density = 0
if(step_to(mob2, mob1))
world.log << "success"


Expected Results:
To get to the same turf as the target

Actual Results:
The mob stops one turf before the step_to target

Does the problem occur:
Every time? Or how often? Every time
In other games? Only tested on SS13
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?
When rolling back to any version before 1645

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
It works fine in lower versions than 1645

Workarounds:
Rolling back to previous versions
Lummox JR changed status to 'Test case needed'
I need a test case for a report like this so I can be sure we're on the same page.
It does seem like there has been a change from 515.1644 -> 515.1645:

/*
These are simple defaults for your project.
*/


/world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default

view = 6 // show up to 6 tiles outward from center (13x13 view)
maxx = 14
maxy = 14
maxz = 1


// Make objects move 8 pixels per tick when walking

/mob
step_size = 8

/obj
step_size = 8

/client/New()
. = ..()
src << "[world.byond_version].[world.byond_build]"
var/mob/mob1 = new(locate(1,1,1))
var/mob/mob2 = new(locate(2,1,1))
mob1.density = 1
mob2.density = 0
if(step_to(mob2, mob1))
src << "success"
else
src << "failure"


Still need a test project though.
I don't understand if there's confusion, but only code is required to reproduce. But here is the single include? https://discord.com/channels/725444629172060262/ 725458744711839873/1302791680663224330
So I ran some tests myself.

The main issue it seems to be is that the distance calculation for step_to() seems to vary between versions.

In version 515.1645, if the distance between the two objects is 0 (using bound_dist, or get_dist in tiled movement), then the function does not proceed since there isn't anymore space.

However, when testing in 514, it seems in contrast, the only way step_to() doesn't move is if the distance is 1 (via get_step() in tiled movement), or if the distance is step_size * -1 (bound_dist() in pixel movement).

Just to add more context. So it doesn't look like the issue is related to density at all.
Another test case amending Ter's test case w/ permission: https://discord.com/channels/725444629172060262/ 725458744711839873/1302860837891080253
Lummox JR resolved issue with message:
Regression: Pathfinding changes in the previous version prevented walkers from reaching their targets in certain movement modes.