Skip to content

Commit

Permalink
movement handler deletion to main destroy proc
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Nov 20, 2023
1 parent fd1373b commit a607814
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,8 @@

QDEL_NULL(iff_tag)

QDEL_NULL(ai_movement_handler)

if(hardcore)
attack_log?.Cut() // Completely clear out attack_log to limit mem usage if we fail to delete

Expand Down
4 changes: 0 additions & 4 deletions code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
/// The actual cooldown declaration for forceful retargeting, reference forced_retarget_time for time in between checks
COOLDOWN_DECLARE(forced_retarget_cooldown)

/mob/living/carbon/xenomorph/Destroy()
QDEL_NULL(ai_movement_handler)
return ..()

/mob/living/carbon/xenomorph/proc/init_movement_handler()
return new /datum/xeno_ai_movement(src)

Expand Down

0 comments on commit a607814

Please sign in to comment.