mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
fixes blind rushers hallucination runtimes (#28084)
* adds a qdeleted check * seems good enough --------- Co-authored-by: Toastical <toastical@toaster.com> Co-authored-by: Toastical <toast@toaster.com>
This commit is contained in:
@@ -134,6 +134,8 @@ SUBSYSTEM_DEF(timer)
|
||||
callBack.InvokeAsync()
|
||||
|
||||
if(ctime_timer.flags & TIMER_LOOP)
|
||||
if(QDELETED(ctime_timer))
|
||||
continue
|
||||
ctime_timer.spent = 0
|
||||
ctime_timer.timeToRun = REALTIMEOFDAY + ctime_timer.wait
|
||||
BINARY_INSERT_TG(ctime_timer, clienttime_timers, /datum/timedevent, ctime_timer, timeToRun, COMPARE_KEY)
|
||||
@@ -180,6 +182,8 @@ SUBSYSTEM_DEF(timer)
|
||||
last_invoke_tick = world.time
|
||||
|
||||
if(timer.flags & TIMER_LOOP) // Prepare looping timers to re-enter the queue
|
||||
if(QDELETED(timer))
|
||||
continue
|
||||
timer.spent = 0
|
||||
timer.timeToRun = world.time + timer.wait
|
||||
timer.bucketJoin()
|
||||
|
||||
@@ -48,16 +48,12 @@
|
||||
var/rush_timer = null
|
||||
|
||||
/obj/effect/hallucination/no_delete/blind_rusher/Initialize(mapload, mob/living/carbon/target)
|
||||
rush_timer = addtimer(CALLBACK(src, PROC_REF(rush)), rush_time, TIMER_LOOP | TIMER_STOPPABLE)
|
||||
rush_timer = addtimer(CALLBACK(src, PROC_REF(rush)), rush_time, TIMER_LOOP | TIMER_DELETE_ME)
|
||||
if(prob(50))
|
||||
hallucination_icon = 'icons/mob/simple_human.dmi'
|
||||
hallucination_icon_state = pick("clown", "skeleton_warden", "skeleton_warden_alt")
|
||||
return ..()
|
||||
|
||||
/obj/effect/hallucination/no_delete/blind_rusher/Destroy()
|
||||
deltimer(rush_timer)
|
||||
return ..()
|
||||
|
||||
/obj/effect/hallucination/no_delete/blind_rusher/proc/rush()
|
||||
if(get_dist(src, target) > min_distance)
|
||||
var/direction = get_dir(src, target) //making sure the hallucination is facing the player correctly.
|
||||
|
||||
Reference in New Issue
Block a user