fix xenoarch death trigger exception (#12465)
* fix xenoarch death trigger exception * generalize
This commit is contained in:
@@ -302,6 +302,10 @@ namespace Content.Shared.MobState.EntitySystems
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void SetMobState(MobStateComponent component, DamageState? old, (DamageState state, FixedPoint2 threshold)? current, EntityUid? origin = null)
|
private void SetMobState(MobStateComponent component, DamageState? old, (DamageState state, FixedPoint2 threshold)? current, EntityUid? origin = null)
|
||||||
{
|
{
|
||||||
|
//if it got deleted instantly in a nuke or something
|
||||||
|
if (!Exists(component.Owner) || Deleted(component.Owner))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!current.HasValue)
|
if (!current.HasValue)
|
||||||
{
|
{
|
||||||
ExitState(component, old);
|
ExitState(component, old);
|
||||||
|
|||||||
Reference in New Issue
Block a user