Fix bug where being eaten as a mouse tethers your ghost to who ate you (#8338)

* Check if the ghost spawn position is in inventory/default/null-space

* attach to grid instead of default spawn point

* Simply attach to grid first before entity is deleted
This commit is contained in:
themias
2022-06-01 03:39:50 -04:00
committed by GitHub
parent eccb9e770f
commit 58cacd12ed

View File

@@ -80,6 +80,7 @@ public sealed class MindSystem : EntitySystem
} }
else if (mind.GhostOnShutdown) else if (mind.GhostOnShutdown)
{ {
Transform(uid).AttachToGridOrMap();
var spawnPosition = Transform(uid).Coordinates; var spawnPosition = Transform(uid).Coordinates;
// Use a regular timer here because the entity has probably been deleted. // Use a regular timer here because the entity has probably been deleted.
Timer.Spawn(0, () => Timer.Spawn(0, () =>