Numbered Steps to Reproduce Problem:
in a while-true loop, sleeping every world.tick_lag, have one mob attempt to pixel-move into another mob below it, that is not part of its group
Code Snippet (if applicable) to Reproduce Problem:
while (1)
for(var/atom/A in world)
A.Tick()
sleep(world.tick_lag)
/atom/movable/proc/MoveBy(var/StepX, var/StepY)
var/NewX = (StepX + step_x + SubStepX) + (x * world.icon_size)
var/NewY = (StepY + step_y + SubStepY) + (y * world.icon_size)
SubStepX = NewX - round(NewX)
SubStepY = NewY - round(NewY)
return Move(locate(round(NewX / world.icon_size), round(NewY / world.icon_size), z), 0, round(NewX % world.icon_size), round(NewY % world.icon_size))
Bump(atom/movable/AM)
. = ..()
world.log << "Bump, [src] against [AM]"
if (YVelocity < 0 && ismob(AM))
AM:Riders += src
Tick()
. = ..()
if (XVelocity < -MaximumVelocity)
XVelocity = -MaximumVelocity
if (XVelocity > MaximumVelocity)
XVelocity = MaximumVelocity
if (YVelocity > MaximumVelocity)
YVelocity = MaximumVelocity
YVelocity -= (Gravity * GetGravityModifier())
if (YVelocity < -MaximumVelocity)
YVelocity = -MaximumVelocity
for(var/atom/movable/AM in Riders)
AM.MoveBy(XVelocity, 0)
if (YVelocity > 0 || (StickyPlatform && YVelocity != 0))
AM.MoveBy(0, YVelocity)
Riders = list( )
if (!MoveBy(XVelocity, 0))
XVelocity = 0 // 0 Velocity if we hit a wall going sideways
if (YVelocity < 0)
Grounded = !MoveBy(0, YVelocity) // Try to move downwards, and flag Grounded if we cant (i.e. riding a mob, solid floor, etc)
if (Grounded)
YVelocity = 0
else
Grounded = FALSE
// Try to move upwards, and 0 velocity if we hit a ceiling
if (!MoveBy(0, YVelocity))
YVelocity = 0
Expected Results:
Bump() to be called every tick
Actual Results:
Bump() called every other tick
Does the problem occur:
Every time? Or how often? Every time
In other games? Not tested
In other user accounts? Not tested
On other computers? Yes
When does the problem NOT occur? If a /mob is bumping against an /obj, Bump() is called consistently every tick
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Not tested
Workarounds: Workaround not found