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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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