mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Fix smoke (#1996)
changes: Smoke no longer leaves mysterious patches of darkness. Smoke now uses client-side animations instead of while loops. Fixes #1985.
This commit is contained in:
@@ -113,7 +113,18 @@ steam.start() -- spawns the effect
|
||||
if (duration)
|
||||
time_to_live = duration
|
||||
spawn (time_to_live)
|
||||
qdel(src)
|
||||
kill()
|
||||
|
||||
/obj/effect/effect/smoke/proc/kill()
|
||||
set waitfor = FALSE
|
||||
animate(src, alpha = 0, time = 2 SECONDS, easing = QUAD_EASING)
|
||||
set_opacity(FALSE)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if (T)
|
||||
T.force_update_lights() // I hate it, but nothing else seems to work.
|
||||
|
||||
QDEL_IN(src, 2 SECONDS)
|
||||
|
||||
/obj/effect/effect/smoke/Crossed(mob/living/carbon/M as mob )
|
||||
..()
|
||||
@@ -271,8 +282,8 @@ steam.start() -- spawns the effect
|
||||
sleep(10)
|
||||
step(smoke,direction)
|
||||
spawn(smoke.time_to_live*0.75+rand(10,30))
|
||||
if (smoke) qdel(smoke)
|
||||
src.total_smoke--
|
||||
qdel(smoke)
|
||||
|
||||
|
||||
/datum/effect/effect/system/smoke_spread/bad
|
||||
|
||||
Reference in New Issue
Block a user