Fix assert when arming the nuke (#18891)
Apparently trying to anchor an entity twice throws an assert!
This commit is contained in:
committed by
GitHub
parent
e3f491cdb8
commit
9124c60db2
@@ -455,7 +455,12 @@ public sealed class NukeSystem : EntitySystem
|
|||||||
_sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound));
|
_sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound));
|
||||||
|
|
||||||
_itemSlots.SetLock(uid, component.DiskSlot, true);
|
_itemSlots.SetLock(uid, component.DiskSlot, true);
|
||||||
_transform.AnchorEntity(uid, nukeXform);
|
if (!nukeXform.Anchored)
|
||||||
|
{
|
||||||
|
// Admin command shenanigans, just make sure.
|
||||||
|
_transform.AnchorEntity(uid, nukeXform);
|
||||||
|
}
|
||||||
|
|
||||||
component.Status = NukeStatus.ARMED;
|
component.Status = NukeStatus.ARMED;
|
||||||
UpdateUserInterface(uid, component);
|
UpdateUserInterface(uid, component);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user