Skip to content

Commit

Permalink
FIX: Disable Clumsy if ent is dead (#2299)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeZer2 authored Dec 5, 2024
1 parent 47c508b commit c2fb566
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Content.Shared/Clumsy/ClumsySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Content.Shared.Damage;
using Content.Shared.IdentityManagement;
using Content.Shared.Medical;
using Content.Shared.Mobs.Systems;
using Content.Shared.Popups;
using Content.Shared.Stunnable;
using Content.Shared.Weapons.Ranged.Events;
Expand All @@ -24,6 +25,7 @@ public sealed class ClumsySystem : EntitySystem
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;

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

private void OnBeforeClimbEvent(Entity<ClumsyComponent> ent, ref SelfBeforeClimbEvent args)
{
//ss220 don't clumsy if entity is dead start
if (_mobStateSystem.IsDead(ent.Owner))
return;
//ss220 don't clumsy if entity is dead end

// This event is called in shared, thats why it has all the extra prediction stuff.
var rand = new System.Random((int)_timing.CurTick.Value);

Expand Down

0 comments on commit c2fb566

Please sign in to comment.