Fix clown not being clumsy (#5208)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Ephememory
2022-02-16 08:24:38 -06:00
committed by GitHub
parent 6b7919678e
commit 8b1a711843
6 changed files with 36 additions and 17 deletions

View File

@@ -56,10 +56,10 @@ public sealed partial class GunSystem
gun.LastFireTime = curTime;
var coordinates = Transform(gun.Owner).Coordinates;
if (gun.ClumsyCheck && gun.ClumsyDamage != null && ClumsyComponent.TryRollClumsy(user, gun.ClumsyExplodeChance))
if (gun.ClumsyCheck && EntityManager.TryGetComponent<ClumsyComponent>(user, out var clumsyComponent) && ClumsyComponent.TryRollClumsy(user, gun.ClumsyExplodeChance))
{
//Wound them
_damageable.TryChangeDamage(user, gun.ClumsyDamage);
_damageable.TryChangeDamage(user, clumsyComponent.ClumsyDamage);
_stun.TryParalyze(user, TimeSpan.FromSeconds(3f), true);
// Apply salt to the wound ("Honk!")