From 16428315aa6af839e82632cac562940c5610d8e9 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 13 Aug 2017 18:01:40 -0500 Subject: [PATCH 1/2] Merges the two turf/Entereds --- code/game/turfs/turf.dm.rej | 13 +++++++++++++ code/modules/lighting/lighting_turf.dm | 8 -------- 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 code/game/turfs/turf.dm.rej diff --git a/code/game/turfs/turf.dm.rej b/code/game/turfs/turf.dm.rej new file mode 100644 index 0000000000..1c4472c18a --- /dev/null +++ b/code/game/turfs/turf.dm.rej @@ -0,0 +1,13 @@ +diff a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm (rejected hunks) +@@ -163,6 +163,11 @@ + if(explosion_level && AM.ex_check(explosion_id)) + AM.ex_act(explosion_level) + ++ // If an opaque movable atom moves around we need to potentially update visibility. ++ if (AM.opacity) ++ has_opaque_atom = TRUE // Make sure to do this before reconsider_lights(), incase we're on instant updates. Guaranteed to be on in this case. ++ reconsider_lights() ++ + /turf/open/Entered(atom/movable/AM) + ..() + //melting diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index 3aca57c4bf..fc03cfb8c0 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -95,14 +95,6 @@ has_opaque_atom = TRUE break -// If an opaque movable atom moves around we need to potentially update visibility. -/turf/Entered(var/atom/movable/Obj, var/atom/OldLoc) - . = ..() - - if (Obj && Obj.opacity) - has_opaque_atom = TRUE // Make sure to do this before reconsider_lights(), incase we're on instant updates. Guaranteed to be on in this case. - reconsider_lights() - /turf/Exited(var/atom/movable/Obj, var/atom/newloc) . = ..() From 3c91fba8e32157334fdf614e509e0cabfa157a4a Mon Sep 17 00:00:00 2001 From: LetterJay Date: Fri, 18 Aug 2017 11:16:30 -0500 Subject: [PATCH 2/2] Update turf.dm --- code/game/turfs/turf.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index b204406d05..0a7951c075 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -162,6 +162,12 @@ /turf/Entered(atom/movable/AM) if(explosion_level && AM.ex_check(explosion_id)) AM.ex_act(explosion_level) + + // If an opaque movable atom moves around we need to potentially update visibility. + if (AM.opacity) + has_opaque_atom = TRUE // Make sure to do this before reconsider_lights(), incase we're on instant updates. Guaranteed to be on in this case. + reconsider_lights() + /turf/open/Entered(atom/movable/AM) ..()