From 2a5e0420c80c3e10e219eda06356f38bbe6e5e74 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Mon, 11 Jan 2016 16:40:26 +0100 Subject: [PATCH 1/2] Added template entity "Empty.xml" for use as root entity when creating a new map. --- resources/Schema/Entities/Empty.xml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 resources/Schema/Entities/Empty.xml diff --git a/resources/Schema/Entities/Empty.xml b/resources/Schema/Entities/Empty.xml new file mode 100644 index 00000000..70581847 --- /dev/null +++ b/resources/Schema/Entities/Empty.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 349fa9d7fae3702dc9de2e2a9090136e2f621c8a Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Mon, 11 Jan 2016 16:47:30 +0100 Subject: [PATCH 2/2] Fixed crash when creating new entities --- src/Engine/Editor/EditorSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Engine/Editor/EditorSystem.cpp b/src/Engine/Editor/EditorSystem.cpp index 65d9c52b..b49cf555 100644 --- a/src/Engine/Editor/EditorSystem.cpp +++ b/src/Engine/Editor/EditorSystem.cpp @@ -615,8 +615,8 @@ bool EditorSystem::createEntityNode(World* world, EntityID entity) if (ImGui::BeginPopupContextItem("item context menu")) { if (ImGui::Button("Add")) { - EntityID entity = world->CreateEntity(entity); - world->AttachComponent(entity, "Transform"); + EntityID newEntity = world->CreateEntity(entity); + world->AttachComponent(newEntity, "Transform"); } ImGui::SameLine(); if (ImGui::Button("Delete")) {