Removes animation on lighting changes, increases light max radii (#22754)

* change light update speed

* lower dynamic light max radius vals

* wew i actually improved the code for once

* remove define

* mso's wish is my command

* yeh biatch

* found one
This commit is contained in:
Tacolizard
2017-01-06 22:40:27 -08:00
committed by oranges
parent c3e28b3752
commit ac819a17f2
2 changed files with 6 additions and 10 deletions
+1 -2
View File
@@ -5,7 +5,6 @@
#define LIGHTING_CAP_FRAC (255/LIGHTING_CAP) //A precal'd variable we'll use in turf/redraw_lighting()
#define LIGHTING_ICON 'icons/effects/alphacolors.dmi'
#define LIGHTING_ICON_STATE ""
#define LIGHTING_TIME 2 //Time to do any lighting change. Actual number pulled out of my ass
#define LIGHTING_DARKEST_VISIBLE_ALPHA 250 //Anything darker than this is so dark, we'll just consider the whole tile unlit
#define LIGHTING_LUM_FOR_FULL_BRIGHT 6 //Anything who's lum is lower then this starts off less bright.
#define LIGHTING_MIN_RADIUS 4 //Lowest radius a light source can effect.
@@ -13,4 +12,4 @@
//different modes that lights can operate in
#define LIGHTING_REGULAR 1 //Apply all effects additively
#define LIGHTING_STARLIGHT 2 //Track all starlight but only apply brightest
#define LIGHTING_STARLIGHT 2 //Track all starlight but only apply brightest
+5 -8
View File
@@ -313,7 +313,7 @@
else
if(!lighting_object)
lighting_object = new (src)
redraw_lighting(1)
redraw_lighting()
for(var/turf/open/space/T in RANGE_TURFS(1,src))
T.update_starlight()
@@ -324,7 +324,7 @@
if(lighting_object)
lighting_object.PutOut()
/turf/proc/redraw_lighting(instantly = 0)
/turf/proc/redraw_lighting()
if(lighting_object)
var/newalpha
if(lighting_lumcount <= 0)
@@ -338,10 +338,7 @@
if(newalpha >= LIGHTING_DARKEST_VISIBLE_ALPHA)
newalpha = 255
if(lighting_object.alpha != newalpha)
if(instantly)
lighting_object.alpha = newalpha
else
animate(lighting_object, alpha = newalpha, time = LIGHTING_TIME)
lighting_object.alpha = newalpha
if(newalpha >= LIGHTING_DARKEST_VISIBLE_ALPHA)
luminosity = 0
lighting_object.luminosity = 0
@@ -390,8 +387,8 @@
#define LIGHTING_MAX_LUMINOSITY_STATIC 8 //Maximum luminosity to reduce lag.
#define LIGHTING_MAX_LUMINOSITY_MOBILE 7 //Moving objects have a lower max luminosity since these update more often. (lag reduction)
#define LIGHTING_MAX_LUMINOSITY_MOB 6
#define LIGHTING_MAX_LUMINOSITY_MOBILE 8 //Moving objects have a lower max luminosity since these update more often. (lag reduction)
#define LIGHTING_MAX_LUMINOSITY_MOB 8
#define LIGHTING_MAX_LUMINOSITY_TURF 8 //turfs are static too, why was this 1?!
//caps luminosity effects max-range based on what type the light's owner is.