Skip to content

Commit

Permalink
Fixes Electrocuting grabbed targets while insulated (#22087)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasalves8 authored and DebugOk committed Dec 2, 2023
1 parent 2741a3d commit fb0fcc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Content.Server/Electrocution/ElectrocutionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public bool TryDoElectrifiedAct(EntityUid uid, EntityUid targetUid,
_appearance.SetData(uid, ElectrifiedVisuals.IsPowered, true);

siemens *= electrified.SiemensCoefficient;
if (siemens <= 0 || !DoCommonElectrocutionAttempt(targetUid, uid, ref siemens))
if (!DoCommonElectrocutionAttempt(targetUid, uid, ref siemens) || siemens <= 0)
return false; // If electrocution would fail, do nothing.

var targets = new List<(EntityUid entity, int depth)>();
Expand Down

0 comments on commit fb0fcc4

Please sign in to comment.