From 8fa9207abc416e227036353de4e1640e0032a4e1 Mon Sep 17 00:00:00 2001 From: Iamgoofball Date: Wed, 25 Sep 2024 20:52:48 -0700 Subject: [PATCH] Removes particles from Slimed and Slime Food status effects to fix fps lag in xenobio (#86701) ## About The Pull Request Removes particles from Slimed and Slime Food status effects to fix fps lag in xenobio ## Why It's Good For The Game Particles, when used in excessive density, lag the shit out of clients because BYOND. Xenobiology not only creates a lot of particles using both of these status effects, it also rapidly duplicates because of the design of xenobiology. Ergo, massive lag as xenobiology scales up in size over the round progression. This is bad for obvious reasons. Last PR got ignored by both keyholders and maintainers #86076 so I'm remaking it because letting an FPS fix stale out is incredibly bad. Long-term for particles, because they're a dumpster fire from BYOND but we don't want to restrict people from using the feature, we should have a particle management subsystem that keeps track of particle density in an area using the cell system to automatically approve/deny creation of particles to avoid too high of clientside costs, and also automatically handling using shared holder particles in nullspace and adding to viscontents so we can use one particle everywhere it's needed without creating multiple ccing @armhulenn cuz they're a particle gamer ## Changelog :cl: fix: Removes particles from Slimed and Slime Food status effects to fix fps lag in xenobio /:cl: --- .../datums/status_effects/debuffs/slime/slime_food.dm | 9 --------- code/datums/status_effects/debuffs/slime/slimed.dm | 11 ----------- 2 files changed, 20 deletions(-) diff --git a/code/datums/status_effects/debuffs/slime/slime_food.dm b/code/datums/status_effects/debuffs/slime/slime_food.dm index aa711bb878f..538e62e27c5 100644 --- a/code/datums/status_effects/debuffs/slime/slime_food.dm +++ b/code/datums/status_effects/debuffs/slime/slime_food.dm @@ -54,12 +54,3 @@ /datum/status_effect/slime_food/on_remove() feeder = null - -/datum/status_effect/slime_food/update_particles() - if(particle_effect) - return - - particle_effect = new(owner, /particles/pollen) - - //particle coloured like the "pheromones" of the feeder - particle_effect.particles.color = "[feeder.chat_color]a0" diff --git a/code/datums/status_effects/debuffs/slime/slimed.dm b/code/datums/status_effects/debuffs/slime/slimed.dm index 6c2c0fb5be3..2540c4df513 100644 --- a/code/datums/status_effects/debuffs/slime/slimed.dm +++ b/code/datums/status_effects/debuffs/slime/slimed.dm @@ -101,17 +101,6 @@ )) to_chat(owner, span_userdanger("[feedback_text] as the layer of slime eats away at you!")) -/datum/status_effect/slimed/update_particles() - if(particle_effect) - return - - // taste the rainbow - var/particle_type = rainbow ? /particles/slime/rainbow : /particles/slime - particle_effect = new(owner, particle_type) - - if(!rainbow) - particle_effect.particles.color = "[slime_color]a0" - /datum/status_effect/slimed/get_examine_text() return span_warning("[owner.p_They()] [owner.p_are()] covered in bubbling slime!")