From 5f99dc1667b354d3ea0e7277004cc679203aa1ef Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Mon, 23 May 2022 20:08:34 +0200 Subject: [PATCH] Fix stack overflow on rigged power cell explosion. Remove the set to cell charge from explosion code. I assume the cell won't see much use since it's about to be deleted anyways. --- Content.Server/PowerCell/PowerCellSystem.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Content.Server/PowerCell/PowerCellSystem.cs b/Content.Server/PowerCell/PowerCellSystem.cs index f0f9ce4ae039..e636575a4abf 100644 --- a/Content.Server/PowerCell/PowerCellSystem.cs +++ b/Content.Server/PowerCell/PowerCellSystem.cs @@ -85,7 +85,6 @@ private void Explode(EntityUid uid, BatteryComponent? battery = null) return; var radius = MathF.Min(5, MathF.Ceiling(MathF.Sqrt(battery.CurrentCharge) / 30)); - battery.CurrentCharge = 0; _explosionSystem.TriggerExplosive(uid, radius: radius); QueueDel(uid);