MoveLib

by Ter13
Essential movement helper functions and collision overhaul
ID:2265044
 
Not a bug
BYOND Version:511
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 59.0.3071.115
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
I'm using the default settings in the library:

collision_mask=1 & collision_layer=1

MOVEMENT_MODE 1 - Tile Movement is being used.

When bumping into some mobs, the c_mask and c_layer is respected and the moving mob stops as intended. However with other mobs, the mover seems to ignore the mask and layer.


Actual Results:

I am pretty sure I just fixed this problem.

Check revision 18. I think the problem was caused by a mistake in my collision filtering that sometimes filters the wrong movables.

I've corrected it, but I'm not sure if that was the problem caused by your project.

Please let me know if this fixes the problem so I can resolve this one.
The issue persists after updating.

I'm receiving a warning from the library as well:

C:\Users\kenya\Documents\BYOND\lib\ter13\movelib\#defines.dm :724:warning: assignment in condition, may have intended == operator instead

#defines.dm
line 722

turf
Enter(atom/movable/o,atom/fromloc,retval=1)
if(o.collision_proxy) o = o.collision_proxy
if(retval = retval&&!(density&&o.density&&(collision_layer&o.collision_mask)))//here
for(var/atom/movable/a in src.contents-a)
if(a.bound_width==TILE_WIDTH&&a.bound_height==TILE_HEIGHT&&floor(a.gx)==gx&&floor(a.gy==gy))
if(!a.Cross(o))
retval = 0
break
return o.onEnter(src,fromloc,retval)
Yeah, I'll fix the warning on the next push. Send me a small, reproducible sample via discord of the problem in action, and I'll work out where things have gone wrong.

Also, it appears that you didn't actually update the lib.
After investigating the source code, the world was being kicked into pixel movement mode, which was causing the tile-based collision algorithm to fail spectacularly. Don't use tile-based settings in pixel-mode worlds. They are not intended to play nice.
Ter13 resolved issue (Not a bug)