Skip to content

Commit

Permalink
Add check to TryStandUp which validates if an entity can even get up
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryNorfolk committed Jan 17, 2025
1 parent 91a25b1 commit 061128d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Content.Shared/_White/Standing/SharedLayingDownSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ standingState.CurrentState is not StandingState.Lying ||
HasComp<DebrainedComponent>(uid))
return false;

// DeltaV
// Don't allow users to start trying to stand if they couldn't stand anyway
var msg = new StandAttemptEvent();
RaiseLocalEvent(uid, msg, false);
if (msg.Cancelled)
return false;
// DeltaV

var args = new DoAfterArgs(EntityManager, uid, layingDown.StandingUpTime, new StandingUpDoAfterEvent(), uid)
{
BreakOnHandChange = false,
Expand Down

0 comments on commit 061128d

Please sign in to comment.