mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
Some more improvments, removed dview.
This *seems* to be a decent speed up just in the appearent time it takes break all lights to process, and dview wasn't really needed here. Minor oddies can occur on bigger lights near their edges, but not enough to justify the extra cost.
This commit is contained in:
@@ -27,7 +27,7 @@ GLOBAL_LIST_INIT(LIGHTING_CORNER_DIAGONAL, list(NORTHEAST, SOUTHEAST, SOUTHWEST,
|
|||||||
|
|
||||||
/datum/lighting_corner/New(var/turf/new_turf, var/diagonal)
|
/datum/lighting_corner/New(var/turf/new_turf, var/diagonal)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
masters = list()
|
||||||
masters[new_turf] = turn(diagonal, 180)
|
masters[new_turf] = turn(diagonal, 180)
|
||||||
z = new_turf.z
|
z = new_turf.z
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,7 @@
|
|||||||
else
|
else
|
||||||
var/P = get_turf_pixel(top_atom)
|
var/P = get_turf_pixel(top_atom)
|
||||||
if (P != pixel_turf)
|
if (P != pixel_turf)
|
||||||
pixel_turf = get_turf_pixel(top_atom)
|
pixel_turf = P
|
||||||
update = TRUE
|
update = TRUE
|
||||||
|
|
||||||
if (light_range && light_power && !applied)
|
if (light_range && light_power && !applied)
|
||||||
@@ -256,13 +256,15 @@
|
|||||||
var/thing
|
var/thing
|
||||||
var/datum/lighting_corner/C
|
var/datum/lighting_corner/C
|
||||||
var/turf/T
|
var/turf/T
|
||||||
|
if (source_turf)
|
||||||
FOR_DVIEW(T, Ceiling(light_range), source_turf, 0)
|
var/oldlum = source_turf.luminosity
|
||||||
for (thing in T.get_corners(source_turf))
|
source_turf.luminosity = Ceiling(light_range)
|
||||||
C = thing
|
for(T in view(Ceiling(light_range), source_turf))
|
||||||
corners[C] = 0
|
for (thing in T.get_corners(source_turf))
|
||||||
turfs += T
|
C = thing
|
||||||
FOR_DVIEW_END
|
corners[C] = 0
|
||||||
|
turfs += T
|
||||||
|
source_turf.luminosity = oldlum
|
||||||
|
|
||||||
LAZYINITLIST(affecting_turfs)
|
LAZYINITLIST(affecting_turfs)
|
||||||
var/list/L = turfs - affecting_turfs // New turfs, add us to the affecting lights of them.
|
var/list/L = turfs - affecting_turfs // New turfs, add us to the affecting lights of them.
|
||||||
|
|||||||
Reference in New Issue
Block a user