Resolves Issue 757

Cause: Those min() and max() were being called unnecessarily and were skewing the sd_lumcount values.

Rebalanced darkness a little.

Possible issues: Lights seem to have a longer range now. which could possibly explain the increased cpu use of sd_lighting recently.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4356 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-08-10 15:13:14 +00:00
parent 40c2238c24
commit 91d55900ff
2 changed files with 3 additions and 3 deletions

View File

@@ -388,7 +388,7 @@ atom/proc/sd_StripLum(list/V = view(luminosity,src), center = src)
/* increase the turf's brightness depending on the
brightness and distance of the lightsource */
T.sd_lumcount -= (luminosity-get_dist(center,T))
T.sd_lumcount = max(0, T.sd_lumcount)
// T.sd_lumcount = max(0, T.sd_lumcount)
// update the turf's area
T.sd_LumUpdate()
@@ -450,7 +450,7 @@ atom/proc/sd_SetOpacity(new_opacity as num)
if(ATurf)
for(T in affected[A]-view(A.luminosity, ATurf))
T.sd_lumcount -= (A.luminosity-get_dist(A,T))
T.sd_lumcount = max(0, T.sd_lumcount)
// T.sd_lumcount = max(0, T.sd_lumcount)
T.sd_LumUpdate()
@@ -544,7 +544,7 @@ area/proc/sd_LightLevel(slevel = sd_light_level as num, keep = 1)
if(keep) sd_light_level = slevel
slevel = min(max(slevel,0),sd_dark_shades) // restrict range
// slevel = min(max(slevel,0),sd_dark_shades) // restrict range
if(slevel > 0)
luminosity = 1