diff --git a/ZoFo/GameCore/GameObjects/Entities/Entity.cs b/ZoFo/GameCore/GameObjects/Entities/Entity.cs index 97630bf..fc7cea8 100644 --- a/ZoFo/GameCore/GameObjects/Entities/Entity.cs +++ b/ZoFo/GameCore/GameObjects/Entities/Entity.cs @@ -59,7 +59,10 @@ namespace ZoFo.GameCore.GameObjects public virtual void Delete() { - AppManager.Instance.server.DeleteObject(this); + if (AppManager.Instance.gamestate == GameState.HostPlaying) + { + AppManager.Instance.server.DeleteObject(this); + } } } } diff --git a/ZoFo/GameCore/GameObjects/GameObject.cs b/ZoFo/GameCore/GameObjects/GameObject.cs index 335d042..d4472b6 100644 --- a/ZoFo/GameCore/GameObjects/GameObject.cs +++ b/ZoFo/GameCore/GameObjects/GameObject.cs @@ -43,7 +43,10 @@ public abstract class GameObject public void Instantiate(GameObject gameObject) { - AppManager.Instance.server.RegisterGameObject(gameObject); + if (AppManager.Instance.gamestate == GameState.HostPlaying) + { + AppManager.Instance.server.RegisterGameObject(gameObject); + } } #endregion