Merge pull request #12889 from tkdrg/andlettherebeSPEED

Improves speed of redraw_lighting()
This commit is contained in:
Aranclanos
2015-11-09 03:18:13 -03:00
7 changed files with 15 additions and 56 deletions
+4 -4
View File
@@ -314,12 +314,12 @@
newalpha = 0
if(lighting_object.alpha != newalpha)
var/change_time = LIGHTING_TIME
if(instantly)
change_time = 0
animate(lighting_object, alpha = newalpha, time = change_time)
lighting_object.alpha = newalpha
else
animate(lighting_object, alpha = newalpha, time = LIGHTING_TIME)
if(newalpha >= LIGHTING_DARKEST_VISIBLE_ALPHA) //Doesn't actually make it darker or anything, just tells byond you can't see the tile
animate(luminosity = 0, time = 0)
luminosity = 0
lighting_changed = 0