Numbered Steps to Reproduce Problem:
Write bad code
Run project
Code Snippet (if applicable) to Reproduce Problem:
/mob/proc/MoveTo(var/datum/Target = Destination)
if (Destination != Target && Target)
CachedMoveAngle = GetAngleTo(Destination)
Destination = Target
if (!Target)
return
world.log << "[Angle], Cached: [CachedMoveAngle]"
var/Angle = GetAngleTo(Destination)
var/MoveSpeed = min(MoveSpeed(), GetDistanceTo(Destination) * world.icon_size)
var/NewX = ((MoveSpeed * sin(Angle)) + step_x + SubStepX) + (x * world.icon_size)
var/NewY = ((MoveSpeed * cos(Angle)) + step_y + SubStepY) + (y * world.icon_size)
SubStepX = NewX % 1
SubStepY = NewY % 1
if (GetDistanceTo(Destination) <= 1 / world.icon_size)
if (IsMovable(Destination))
Move(Destination:loc, 0, Destination:step_x, Destination:step_y)
Destination = null
else
SmoothMove = 2
Move(locate(round(NewX / world.icon_size), y, z), 0, round(NewX % world.icon_size), step_y)
Move(locate(x, round(NewY / world.icon_size), z), 0, step_x, round(NewY % world.icon_size))
Expected Results: Compile error, dream seeker not started
Actual Results: Compile error, dream seeker started anyways
Does the problem occur:
Every time? Or how often? Every time
In other games? N/A
In other user accounts? N/A
On other computers? N/A
When does the problem NOT occur?
When I don't bugger up the code
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Not tested
Workarounds: N/A