From 201b1bec89b9316cbb9c34268c4c16c7a17daede Mon Sep 17 00:00:00 2001 From: 20kdc Date: Sat, 2 Oct 2021 18:53:09 +0100 Subject: [PATCH] Fix time management bugs in RadiationPulseSystem (#4743) --- Content.Server/Radiation/RadiationPulseSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/Radiation/RadiationPulseSystem.cs b/Content.Server/Radiation/RadiationPulseSystem.cs index 093251ef39..f179dce863 100644 --- a/Content.Server/Radiation/RadiationPulseSystem.cs +++ b/Content.Server/Radiation/RadiationPulseSystem.cs @@ -20,15 +20,16 @@ namespace Content.Server.Radiation { base.Update(frameTime); - _accumulator += RadiationCooldown; + _accumulator += frameTime; while (_accumulator > RadiationCooldown) { _accumulator -= RadiationCooldown; + // All code here runs effectively every RadiationCooldown seconds, so use that as the "frame time". foreach (var comp in EntityManager.EntityQuery(true)) { - comp.Update(frameTime); + comp.Update(RadiationCooldown); var ent = comp.Owner; if (ent.Deleted) continue;