From 7d9ab6723102e82602a9ce361b56770b25b85d09 Mon Sep 17 00:00:00 2001 From: Michal78900 Date: Tue, 17 Aug 2021 21:10:58 +0200 Subject: [PATCH] Fixed the funny --- MapEditorReborn/Methods.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MapEditorReborn/Methods.cs b/MapEditorReborn/Methods.cs index 9294d5ad..0046d059 100644 --- a/MapEditorReborn/Methods.cs +++ b/MapEditorReborn/Methods.cs @@ -415,10 +415,7 @@ public static GameObject SpawnObject(Vector3 position, ToolGunMode mode) { GameObject gameObject = Object.Instantiate(mode.GetObjectByMode(), position, Quaternion.identity); - Room room = Map.FindParentRoom(gameObject); - - if (room != null) - gameObject.transform.rotation = GetRelativeRotation(Vector3.zero, room); + gameObject.transform.rotation = GetRelativeRotation(Vector3.zero, Map.FindParentRoom(gameObject)); switch (mode) {