Prevent pacified players from throwing dangerous stuff (#22268)

This commit is contained in:
KP
2023-12-11 15:40:22 -08:00
committed by GitHub
parent 5143030baf
commit d0085f9428
9 changed files with 136 additions and 20 deletions

View File

@@ -204,9 +204,9 @@ namespace Content.Server.Hands.Systems
// Let other systems change the thrown entity (useful for virtual items)
// or the throw strength.
var ev = new BeforeThrowEvent(throwEnt, direction, throwStrength, player);
RaiseLocalEvent(player, ev, false);
RaiseLocalEvent(player, ref ev);
if (ev.Handled)
if (ev.Cancelled)
return true;
// This can grief the above event so we raise it afterwards