Sometimes Bump() is called on dense objects that did NOT return 0 on Cross() when one of the objects on the same tile did.
Occurs in tile-based movement, not sure about pixel-based.
Numbered Steps to Reproduce Problem:
In the below example, place an /obj/DontCrossMe/ and an /obj/CrossMe on the same tile.
Code Snippet (if applicable) to Reproduce Problem:
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)
// Make objects move 8 pixels per tick when walking
atom
movable
Bump(var/atom/movable/A)
..()
world << "BUMPING [src]|[src.type] WITH [A]|[A.type]"
mob
icon = 'whoops.dmi'
obj
density = 1
icon = 'whoops.dmi'
CrossMe
icon_state = "1"
Cross()
return 1
Bump()
world << "Oh no, we're bumping and we shouldn't be!"
DontCrossMe
icon_state = "2"
Cross(var/atom/movable/A)
world << "no crossing!"
return 0
Bump()
world << "We should be getting bumped so this is okay!" // Never reached.
..()
Expected Results:
/atom/movable/Bump() would be called with the uncrossable DontCrossMe as an argument. i.e.:
BUMPING Guest-1964986568|/mob WITH DontCrossMe|/obj/DontCrossMe
Actual Results:
BUMPING Guest-1964986568|/mob WITH CrossMe|/obj/CrossMe
When does the problem NOT occur?
I believe that this wouldn't occur if CrossMe had density = 0, although I'll test that after writing this post and describe the results in a reply.
By the way, this problem occurs both in 509 and the current 510 beta. (510.1340)
In this case, Bump() is NEVER called, despite the fact that movement onto the tile was prevented by an overriden Cross(). BYOND only seems to care about density when looking for an atom use as an arg for Bump().