mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-06-09 13:26:34 +02:00
Bugfix: Banana cream pies stun when target is already creamed (#44209)
OnCreamPiedHitBy: Paralyze before exit
This commit is contained in:
@@ -118,12 +118,17 @@ public abstract partial class SharedCreamPieSystem : EntitySystem
|
||||
|
||||
private void OnCreamPiedHitBy(Entity<CreamPiedComponent> creamPied, ref ThrowHitByEvent args)
|
||||
{
|
||||
if (creamPied.Comp.CreamPied || !Exists(args.Thrown) || !TryComp<CreamPieComponent>(args.Thrown, out var creamPie))
|
||||
if (!Exists(args.Thrown) || !TryComp<CreamPieComponent>(args.Thrown, out var creamPie))
|
||||
return;
|
||||
|
||||
_stunSystem.TryUpdateParalyzeDuration(creamPied.Owner, creamPie.ParalyzeTime);
|
||||
|
||||
// Already creamed, no need to spam popups.
|
||||
if (creamPied.Comp.CreamPied)
|
||||
return;
|
||||
|
||||
// TODO: Check if they even have a head that can be hit.
|
||||
SetCreamPied(creamPied.AsNullable(), true);
|
||||
_stunSystem.TryUpdateParalyzeDuration(creamPied.Owner, creamPie.ParalyzeTime);
|
||||
|
||||
// Throwing is not predicted, so the thrower is not equal to the client predicting the collision, so we cannot pass in a user.
|
||||
// TODO: Make the popup API sane.
|
||||
|
||||
Reference in New Issue
Block a user