last words error fix (#39245)

4 line bugfix
This commit is contained in:
xsainteer
2025-07-28 18:56:48 +06:00
committed by GitHub
parent 3c76b5a8aa
commit 901cef43c9

View File

@@ -65,6 +65,10 @@ public sealed class CritMobActionsSystem : EntitySystem
_quickDialog.OpenDialog(actor.PlayerSession, Loc.GetString("action-name-crit-last-words"), "", _quickDialog.OpenDialog(actor.PlayerSession, Loc.GetString("action-name-crit-last-words"), "",
(string lastWords) => (string lastWords) =>
{ {
// if a person is gibbed/deleted, they can't say last words
if (Deleted(uid))
return;
// Intentionally does not check for muteness // Intentionally does not check for muteness
if (actor.PlayerSession.AttachedEntity != uid if (actor.PlayerSession.AttachedEntity != uid
|| !_mobState.IsCritical(uid)) || !_mobState.IsCritical(uid))