Skip to content

Commit

Permalink
unregisters the signal if we burst and already set owner to null
Browse files Browse the repository at this point in the history
  • Loading branch information
Birdtalon committed Nov 9, 2023
1 parent 9ea31d9 commit c7e8ff4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/modules/cm_aliens/structures/egg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,17 @@ SPECIAL EGG USED BY EGG CARRIER
if(last_refreshed + CARRIER_EGG_UNSUSTAINED_LIFE < world.time)
start_unstoppable_decay()

///Burst the egg without hugger release after a 10 second timer & remove the life timer.
/obj/effect/alien/egg/carrier_egg/proc/start_unstoppable_decay()
addtimer(CALLBACK(src, PROC_REF(Burst), TRUE), 10 SECONDS)
if(life_timer)
deltimer(life_timer)

/obj/effect/alien/egg/carrier_egg/Burst(kill, instant_trigger, mob/living/carbon/xenomorph/X, is_hugger_player_controlled)
. = ..()
UnregisterSignal(owner, COMSIG_PARENT_QDELETING)
owner = null


/obj/effect/alien/egg/carrier_egg/proc/cleanup_owner()
SIGNAL_HANDLER
owner = null
Expand Down

0 comments on commit c7e8ff4

Please sign in to comment.