mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Fix lag during Hell Universe
1. Found the leak of atom/movable/overlay deletions, it was being caused by door/cultify 2. Found the last major source of regular deletions, it was being caused by table/New() deleting any prior tables while cultify intentionally spawned tables on top of the tables 3. Commented out horde because it barely works, it adds little since every is already dead by this point, and it uses over 100% of the cpu of any server to run even normally.
This commit is contained in:
@@ -323,19 +323,10 @@ var/list/all_doors = list()
|
|||||||
update_nearby_tiles()
|
update_nearby_tiles()
|
||||||
|
|
||||||
/obj/machinery/door/cultify()
|
/obj/machinery/door/cultify()
|
||||||
icon_state = "null"
|
if(invisibility != INVISIBILITY_MAXIMUM)
|
||||||
density = 0
|
invisibility = INVISIBILITY_MAXIMUM
|
||||||
c_animation = new /atom/movable/overlay(src.loc)
|
density = 0
|
||||||
c_animation.name = "cultification"
|
anim(target = src, a_icon = 'icons/effects/effects.dmi', a_icon_state = "breakdoor", sleeptime = 10)
|
||||||
c_animation.density = 0
|
|
||||||
c_animation.anchored = 1
|
|
||||||
c_animation.icon = 'icons/effects/effects.dmi'
|
|
||||||
c_animation.layer = 5
|
|
||||||
c_animation.master = src.loc
|
|
||||||
c_animation.icon_state = "breakdoor"
|
|
||||||
flick("cultification",c_animation)
|
|
||||||
spawn(10)
|
|
||||||
del(c_animation)
|
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/machinery/door/Destroy()
|
/obj/machinery/door/Destroy()
|
||||||
|
|||||||
@@ -31,14 +31,13 @@
|
|||||||
T.update_icon()
|
T.update_icon()
|
||||||
|
|
||||||
/obj/structure/table/cultify()
|
/obj/structure/table/cultify()
|
||||||
new /obj/structure/table/woodentable(loc)
|
new /obj/structure/table/woodentable(loc) //See New() for qdel
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/structure/table/New()
|
/obj/structure/table/New()
|
||||||
..()
|
..()
|
||||||
for(var/obj/structure/table/T in src.loc)
|
for(var/obj/structure/table/T in src.loc)
|
||||||
if(T != src)
|
if(T != src)
|
||||||
del(T)
|
qdel(T)
|
||||||
update_icon()
|
update_icon()
|
||||||
update_adjacent()
|
update_adjacent()
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,10 @@
|
|||||||
proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
|
proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
|
||||||
//This proc throws up either an icon or an animation for a specified amount of time.
|
//This proc throws up either an icon or an animation for a specified amount of time.
|
||||||
//The variables should be apparent enough.
|
//The variables should be apparent enough.
|
||||||
|
if(!location && target)
|
||||||
|
location = get_turf(target)
|
||||||
|
if(location && !target)
|
||||||
|
target = location
|
||||||
var/atom/movable/overlay/animation = getFromPool(/atom/movable/overlay, location)
|
var/atom/movable/overlay/animation = getFromPool(/atom/movable/overlay, location)
|
||||||
if(direction)
|
if(direction)
|
||||||
animation.dir = direction
|
animation.dir = direction
|
||||||
@@ -34,8 +38,8 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
|||||||
animation.icon_state = "blank"
|
animation.icon_state = "blank"
|
||||||
animation.master = target
|
animation.master = target
|
||||||
flick(flick_anim, animation)
|
flick(flick_anim, animation)
|
||||||
sleep(max(sleeptime, 15))
|
spawn(max(sleeptime, 15))
|
||||||
returnToPool(animation)
|
returnToPool(animation)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//called when the tile is cultified
|
//called when the tile is cultified
|
||||||
|
|||||||
@@ -82,9 +82,9 @@
|
|||||||
shuttletarget = pick(escape_list) //Pick a shuttle target
|
shuttletarget = pick(escape_list) //Pick a shuttle target
|
||||||
enroute = 1
|
enroute = 1
|
||||||
stop_automated_movement = 1
|
stop_automated_movement = 1
|
||||||
spawn()
|
/* spawn()
|
||||||
if(!src.stat)
|
if(!src.stat)
|
||||||
horde()
|
horde()*/
|
||||||
|
|
||||||
if(get_dist(src, shuttletarget) <= 2) //The monster reached the escape hallway
|
if(get_dist(src, shuttletarget) <= 2) //The monster reached the escape hallway
|
||||||
enroute = 0
|
enroute = 0
|
||||||
|
|||||||
@@ -42,9 +42,9 @@
|
|||||||
shuttletarget = pick(escape_list) //Pick a shuttle target
|
shuttletarget = pick(escape_list) //Pick a shuttle target
|
||||||
enroute = 1
|
enroute = 1
|
||||||
stop_automated_movement = 1
|
stop_automated_movement = 1
|
||||||
spawn()
|
/* spawn()
|
||||||
if(!src.stat)
|
if(!src.stat)
|
||||||
horde()
|
horde()*/
|
||||||
|
|
||||||
if(get_dist(src, shuttletarget) <= 2) //The monster reached the escape hallway
|
if(get_dist(src, shuttletarget) <= 2) //The monster reached the escape hallway
|
||||||
enroute = 0
|
enroute = 0
|
||||||
|
|||||||
@@ -66,9 +66,9 @@
|
|||||||
shuttletarget = pick(escape_list) //Pick a shuttle target
|
shuttletarget = pick(escape_list) //Pick a shuttle target
|
||||||
enroute = 1
|
enroute = 1
|
||||||
stop_automated_movement = 1
|
stop_automated_movement = 1
|
||||||
spawn()
|
/* spawn()
|
||||||
if(!src.stat)
|
if(!src.stat)
|
||||||
horde()
|
horde()*/
|
||||||
|
|
||||||
if(get_dist(src, shuttletarget) <= 2) //The monster reached the escape hallway
|
if(get_dist(src, shuttletarget) <= 2) //The monster reached the escape hallway
|
||||||
enroute = 0
|
enroute = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user