Skip to content

Commit

Permalink
Fixes a Hard Del in regenerate_organs (#12068)
Browse files Browse the repository at this point in the history
  • Loading branch information
HowToLoLu authored Dec 25, 2024
1 parent 7a3d5b3 commit 69da81e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,15 @@ GLOBAL_LIST_EMPTY(features_by_species)
oldorgan = null
else
oldorgan.Remove(C, special = TRUE)
required_organs -= oldorgan
required_organs -= oldorgan.type
QDEL_NULL(oldorgan) //we cannot just tab this out because we need to skip the deleting if it is a decoy brain.

if(oldorgan)
oldorgan.setOrganDamage(0)
else if(should_have && !(initial(neworgan.zone) in excluded_zones))
used_neworgan = TRUE
neworgan.Insert(C, TRUE, FALSE)
required_organs |= neworgan
required_organs |= neworgan.type

if(!used_neworgan)
qdel(neworgan)
Expand Down

0 comments on commit 69da81e

Please sign in to comment.