Skip to content

Commit c2fb566

Browse files
authored
FIX: Disable Clumsy if ent is dead (#2299)
1 parent 47c508b commit c2fb566

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Content.Shared/Clumsy/ClumsySystem.cs

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Content.Shared.Damage;
66
using Content.Shared.IdentityManagement;
77
using Content.Shared.Medical;
8+
using Content.Shared.Mobs.Systems;
89
using Content.Shared.Popups;
910
using Content.Shared.Stunnable;
1011
using Content.Shared.Weapons.Ranged.Events;
@@ -24,6 +25,7 @@ public sealed class ClumsySystem : EntitySystem
2425
[Dependency] private readonly DamageableSystem _damageable = default!;
2526
[Dependency] private readonly IGameTiming _timing = default!;
2627
[Dependency] private readonly IConfigurationManager _cfg = default!;
28+
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
2729

2830
public override void Initialize()
2931
{
@@ -82,6 +84,11 @@ private void BeforeGunShotEvent(Entity<ClumsyComponent> ent, ref SelfBeforeGunSh
8284

8385
private void OnBeforeClimbEvent(Entity<ClumsyComponent> ent, ref SelfBeforeClimbEvent args)
8486
{
87+
//ss220 don't clumsy if entity is dead start
88+
if (_mobStateSystem.IsDead(ent.Owner))
89+
return;
90+
//ss220 don't clumsy if entity is dead end
91+
8592
// This event is called in shared, thats why it has all the extra prediction stuff.
8693
var rand = new System.Random((int)_timing.CurTick.Value);
8794

0 commit comments

Comments
 (0)