Merge pull request #2674 from yogstation13/upstream-merge-40415

[MIRROR] Ice sliding related fixes.
This commit is contained in:
Ling
2018-09-24 13:18:43 +02:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -51,6 +51,9 @@
last_processed = world.time
/datum/forced_movement/proc/TryMove(recursive = FALSE)
if(QDELETED(src)) //Our previous step caused deletion of this datum
return
var/atom/movable/vic = victim //sanic
var/atom/tar = target

View File

@@ -231,6 +231,7 @@
C.accident(I)
var/olddir = C.dir
C.moving_diagonally = 0 //If this was part of diagonal move slipping will stop it.
if(!(lube & SLIDE_ICE))
C.Knockdown(knockdown_amount)
C.stop_pulling()
@@ -244,6 +245,8 @@
if(lube&SLIDE)
new /datum/forced_movement(C, get_ranged_target_turf(C, olddir, 4), 1, FALSE, CALLBACK(C, /mob/living/carbon/.proc/spin, 1, 1))
else if(lube&SLIDE_ICE)
if(C.force_moving) //If we're already slipping extend it
qdel(C.force_moving)
new /datum/forced_movement(C, get_ranged_target_turf(C, olddir, 1), 1, FALSE) //spinning would be bad for ice, fucks up the next dir
return 1