ID:2577631
 
Resolved
BYOND Version:513.1525
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Firefox 76.0
Applies to:Dream Daemon
Status: Resolved

This issue has been resolved.
Descriptive Problem Summary:

Our project overrides "Move()" proc on most movable atoms in order to control gliding and make atoms "linked" to one another glide at the same speed.

https://user-images.githubusercontent.com/33260604/ 34704533-711ae136-f4d8-11e7-8eb7-0a723ddfe9aa.gif
This gif shows we are trying to do.

As of the most recent update (1525), this no longer works, and atoms seem to teleport from one tile to the other instead, with no animation displayed.

Code Snippet (if applicable) to Reproduce Problem:

/atom/movable/Move(NewLoc, Dir = 0, step_x = 0, step_y = 0, var/glide_size_override = 0)
if(glide_size_override > 0)
set_glide_size(glide_size_override)
. = ..()

/atom/movable/proc/set_glide_size(glide_size_override = 0, var/min = 0.9, var/max = WORLD_ICON_SIZE/2)
if(!glide_size_override || glide_size_override > max)
glide_size = 0
else
glide_size = max(min, glide_size_override)


You may find a more complete code at https://github.com/vgstation-coders/vgstation13/blob/ db920faa5859d8e55c0087453c79f4312797d137/code/game/ atoms_movable.dm

Do note that we override the Move() procs of our atoms to include this new argument, and that no runtimes are being produced.

Expected Results:

Gliding to be taken into account, and atoms to move smoothly.

Actual Results:

There is no gliding at all. Atoms just jump from one tile to the other without any animation.

Does the problem occur:
Every time? Or how often? Yes.
In other games? Not applicable.
In other user accounts? Yes.
On other computers? Yes.

When does the problem NOT occur? This problem is exclusive to 1525 and if you override Byond's Move() procs, it seems.

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.)

Our code did not have any issues before Byond version 513.1525.

Workarounds:

If you are overriding Move() procs to modify glide_size, you will need to stay on 1523, which is the most recent BYOND version without the bug.
As it turns out, it's glidding in general which no longer seems to work.
Even after removing most of our code which adds an extra argument to Move() and using a default glide_size of 8, there is no gliding.
In response to Shifty_rail
If all gliding is broken in a project, that's a sign that the project has native pixel movement mode enabled.

Somewhere, some movable atom has a value for step_x, step_y, bound_x, bound_y, bound_width, or bound_height that isn't in line with the tile grid.

These variables can be set in the map editor or saved in savefiles to be loaded into projects that have no code related to them (anymore).

It's easy to tell that gliding isn't broken in BYOND itself just by making a new project with tile movement, which can be done in under a minute.
We do not have pixel movement enabled and the values of step_x, step_y, bound_x, bound_y, bound_height, aren't changed, so I don't believe it is that.

We have gliding working on Byond v513.1523, but it suddenly does not work on Byond v513.1525, and that's using the same code.
Actually we do use bound_width and bound_height, but only in multiples of the icon size, which never previously caused problems. I suspect the changes to how these are saved in 1525 may be what caused this.
In response to Exxion
There's a bug fix in 513.1526 that deals with initial() on bounds. You may need to clean the bounds out of your savefiles, or better yet have Read() remove the bounds var before calling ..().

atom/movable/Read(savefile/F)
Remove("bounds")
return ..()
Lummox JR resolved issue

Login to reply.