mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
(Partially) Fixes Out Of Memory crashes (#17043)
* Fixes massive memory leak * Brain Runtime Fix * There was no reason for this to be a spawn(0) And no I didn't spawn with no blood - https://i.imgur.com/vPizqCD.png * Fixes deadringer not properly deathgasping the right entity * Wounds properly get delted off destroyed limbs * Update vorestation.dme * Runtime fix & DNA lock fix * More qdels * qdel * comment out
This commit is contained in:
@@ -124,7 +124,7 @@
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
qdel_swap(brainmob.dna, H.dna.Clone())
|
||||
brainmob.container = src
|
||||
|
||||
// Copy modifiers.
|
||||
@@ -227,7 +227,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/mmi/digital/transfer_identity(var/mob/living/carbon/H)
|
||||
brainmob.dna = H.dna
|
||||
qdel_swap(brainmob.dna, H.dna.Clone())
|
||||
brainmob.timeofhostdeath = H.timeofdeath
|
||||
brainmob.set_stat(CONSCIOUS)
|
||||
if(H.mind)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
if(stat != DEAD) //If not dead.
|
||||
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
ghostize() //Ghostize checks for key so nothing else is necessary.
|
||||
qdel(dna)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/brain/say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
check_dna()
|
||||
dna.ready_dna(src)
|
||||
for(var/obj/item/organ/O in organs)
|
||||
O.dna = dna // Update all of those because apparently they're separate, and icons won't update properly
|
||||
qdel_swap(O.dna, dna.Clone()) // Update all of those because apparently they're separate, and icons won't update properly
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_species(var/check_whitelist = 1, var/list/whitelist = list(), var/list/blacklist = list())
|
||||
var/list/valid_species = new()
|
||||
|
||||
@@ -1305,18 +1305,16 @@
|
||||
var/datum/mob_descriptor/descriptor = species.descriptors[desctype]
|
||||
descriptors[desctype] = descriptor.default_value
|
||||
|
||||
spawn(0)
|
||||
if(regen_icons) regenerate_icons()
|
||||
make_blood()
|
||||
if(vessel.total_volume < species.blood_volume)
|
||||
vessel.maximum_volume = species.blood_volume
|
||||
vessel.add_reagent(REAGENT_ID_BLOOD, species.blood_volume - vessel.total_volume)
|
||||
else if(vessel.total_volume > species.blood_volume)
|
||||
vessel.remove_reagent(REAGENT_ID_BLOOD,vessel.total_volume - species.blood_volume) //This one should stay remove_reagent to work even lack of a O_heart
|
||||
vessel.maximum_volume = species.blood_volume
|
||||
fixblood()
|
||||
species.update_attack_types() //VOREStation Edit - Required for any trait that updates unarmed_types in setup.
|
||||
species.update_vore_belly_def_variant()
|
||||
make_blood()
|
||||
if(vessel.total_volume < species.blood_volume)
|
||||
vessel.maximum_volume = species.blood_volume
|
||||
vessel.add_reagent(REAGENT_ID_BLOOD, species.blood_volume - vessel.total_volume)
|
||||
else if(vessel.total_volume > species.blood_volume)
|
||||
vessel.remove_reagent(REAGENT_ID_BLOOD,vessel.total_volume - species.blood_volume) //This one should stay remove_reagent to work even lack of a O_heart
|
||||
vessel.maximum_volume = species.blood_volume
|
||||
fixblood()
|
||||
species.update_attack_types() //Required for any trait that updates unarmed_types in setup.
|
||||
species.update_vore_belly_def_variant()
|
||||
|
||||
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
|
||||
update_hud()
|
||||
|
||||
+13
-8
@@ -4,21 +4,22 @@
|
||||
living_mob_list -= src
|
||||
player_list -= src
|
||||
unset_machine()
|
||||
QDEL_NULL(hud_used)
|
||||
clear_fullscreen()
|
||||
if(client)
|
||||
for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
|
||||
qdel(spell_master)
|
||||
remove_screen_obj_references()
|
||||
client.screen.Cut()
|
||||
client.screen = list()
|
||||
if(mind && mind.current == src)
|
||||
spellremove(src)
|
||||
ghostize()
|
||||
if(focus)
|
||||
focus = null
|
||||
if(plane_holder)
|
||||
QDEL_NULL(plane_holder)
|
||||
|
||||
if(!istype(src,/mob/observer))
|
||||
ghostize()
|
||||
// QDEL_NULL(soulgem) //Soulcatcher. Needs to be ported sometime.
|
||||
QDEL_NULL(dna)
|
||||
QDEL_NULL(plane_holder)
|
||||
QDEL_NULL(hud_used)
|
||||
for(var/key in alerts) //clear out alerts
|
||||
clear_alert(key)
|
||||
if(pulling)
|
||||
stop_pulling() //TG does this on atom/movable but our stop_pulling proc is here so whatever
|
||||
|
||||
@@ -28,6 +29,9 @@
|
||||
if(vorePanel)
|
||||
QDEL_NULL(vorePanel)
|
||||
|
||||
previewing_belly = null // from code/modules/vore/eating/mob_ch.dm
|
||||
vore_selected = null // from code/modules/vore/eating/mob_vr
|
||||
focus = null
|
||||
|
||||
if(mind)
|
||||
if(mind.current == src)
|
||||
@@ -39,6 +43,7 @@
|
||||
update_client_z(null)
|
||||
//return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
|
||||
/mob/proc/remove_screen_obj_references()
|
||||
hands = null
|
||||
pullin = null
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
M.real_name = src.real_name
|
||||
|
||||
if(src.dna)
|
||||
M.dna = src.dna.Clone()
|
||||
qdel_swap(M.dna, src.dna.Clone())
|
||||
|
||||
if(mind)
|
||||
mind.transfer_to(M)
|
||||
|
||||
Reference in New Issue
Block a user