Fixes a really stupid mistake where a sleep() was causing the explosion() proc to end after the sleep due to src being null. This meant that the lighting process was turned off but never turned back on. It also meant powernets were deferred permanently :( sorry.

Reduced the Login delay for new_players. It stays because it protects against rapid connect/disconnects sending resources repeatedly, it's just a lot less annoying now.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4554 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-08-26 17:50:29 +00:00
parent 5eb6bd3b68
commit 474294466a
3 changed files with 59 additions and 62 deletions
+9 -11
View File
@@ -8,6 +8,7 @@
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
src = null
spawn(0)
var/start = world.timeofday
epicenter = get_turf(epicenter)
@@ -39,24 +40,21 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
for(var/turf/T in range(epicenter, max(devastation_range, heavy_impact_range, light_impact_range)))
var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(dist < devastation_range)
dist = 1
else if(dist < heavy_impact_range)
dist = 2
else if(dist < light_impact_range)
dist = 3
else
continue
if(dist < devastation_range) dist = 1
else if(dist < heavy_impact_range) dist = 2
else if(dist < light_impact_range) dist = 3
else continue
T.ex_act(dist)
if(T)
for(var/atom/object in T.contents)
object.ex_act(dist)
for(var/atom_movable in T.contents)
var/atom/movable/AM = atom_movable
AM.ex_act(dist)
//here util we get explosions to be less laggy, might help us identify issues after changes to splosions (because let's face it we've had a few)
world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [(world.timeofday-start)/10] seconds."
sleep(10)
sleep(8)
if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
if(!powernet_rebuild_was_deferred_already)