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:
Toastical
2025-02-10 03:34:30 +00:00
committed by GitHub
co-authored by Toastical Toastical
parent c1d08844df
commit 7518262c6e
2 changed files with 5 additions and 5 deletions
@@ -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.