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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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