From 1a005898a0fe190f1f678dde6cd27fdf63a05e9b Mon Sep 17 00:00:00 2001 From: Marina Gryphon Date: Tue, 6 Feb 2018 10:51:32 -0600 Subject: [PATCH 1/4] Makes sure that Z-shadows get updated on `move_contents_to` being called. Fixes #4669. --- code/_helpers/unsorted.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index cc65f2fad6..e6b607e673 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -817,10 +817,11 @@ proc/GaussRandRound(var/sigma,var/roundto) for(var/obj/O in T) O.loc = X - //Move the mobs unless it's an AI eye or other eye type. + //Move the mobs unless it's an AI eye or other eye type. Need to check their Z-shadow. for(var/mob/M in T) if(istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable M.loc = X + M.check_shadow() if(shuttlework) var/turf/simulated/shuttle/SS = T From 6a3e2fd23955fa893c350e3f8be6cf735bb0aec4 Mon Sep 17 00:00:00 2001 From: Marina Gryphon Date: Tue, 6 Feb 2018 10:53:20 -0600 Subject: [PATCH 2/4] Clarifies comments, reduces line change. --- code/_helpers/unsorted.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index e6b607e673..53af5c50bc 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -817,11 +817,11 @@ proc/GaussRandRound(var/sigma,var/roundto) for(var/obj/O in T) O.loc = X - //Move the mobs unless it's an AI eye or other eye type. Need to check their Z-shadow. + //Move the mobs unless it's an AI eye or other eye type. for(var/mob/M in T) if(istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable M.loc = X - M.check_shadow() + M.check_shadow() // Need to check their Z-shadow, which is normally done in forceMove(). if(shuttlework) var/turf/simulated/shuttle/SS = T From 3b6830de509f85ef9159511f591f1056a2b042c9 Mon Sep 17 00:00:00 2001 From: Marina Gryphon Date: Tue, 6 Feb 2018 11:08:04 -0600 Subject: [PATCH 3/4] Should compile now, oops. --- code/_helpers/unsorted.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 53af5c50bc..9a22b1ec4f 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -821,7 +821,9 @@ proc/GaussRandRound(var/sigma,var/roundto) for(var/mob/M in T) if(istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable M.loc = X - M.check_shadow() // Need to check their Z-shadow, which is normally done in forceMove(). + if(istype(M, /mob/living) + var/mob/living/LM = M + LM.check_shadow() // Need to check their Z-shadow, which is normally done in forceMove(). if(shuttlework) var/turf/simulated/shuttle/SS = T From cb3a058aa373f09ad80c6321a7549e9e2fbaa1c0 Mon Sep 17 00:00:00 2001 From: Marina Gryphon Date: Tue, 6 Feb 2018 11:10:28 -0600 Subject: [PATCH 4/4] Closing parenthesis. --- code/_helpers/unsorted.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 9a22b1ec4f..3d3877ab5b 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -821,7 +821,7 @@ proc/GaussRandRound(var/sigma,var/roundto) for(var/mob/M in T) if(istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable M.loc = X - if(istype(M, /mob/living) + if(istype(M, /mob/living)) var/mob/living/LM = M LM.check_shadow() // Need to check their Z-shadow, which is normally done in forceMove().