From 7425993d2deb725312543deaa205a761f9c99ed4 Mon Sep 17 00:00:00 2001 From: Lynix Date: Mon, 15 May 2017 10:11:42 +0200 Subject: [PATCH] SDK/World: Fix waiting entities not being cleared on time --- SDK/src/NDK/World.cpp | 1 + tests/SDK/NDK/Systems/ListenerSystem.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SDK/src/NDK/World.cpp b/SDK/src/NDK/World.cpp index 8b7b51186..3ed1a25d0 100644 --- a/SDK/src/NDK/World.cpp +++ b/SDK/src/NDK/World.cpp @@ -119,6 +119,7 @@ namespace Ndk // This is made to avoid that handle warn uselessly entities before their destruction m_entities.clear(); m_entityBlocks.clear(); + m_waitingEntities.clear(); m_aliveEntities.Clear(); m_dirtyEntities.Clear(); diff --git a/tests/SDK/NDK/Systems/ListenerSystem.cpp b/tests/SDK/NDK/Systems/ListenerSystem.cpp index 2792dbc25..b83b24cd1 100644 --- a/tests/SDK/NDK/Systems/ListenerSystem.cpp +++ b/tests/SDK/NDK/Systems/ListenerSystem.cpp @@ -11,7 +11,7 @@ SCENARIO("ListenerSystem", "[NDK][LISTENERSYSTEM]") GIVEN("A world and an entity with listener & node components") { Ndk::World world; - const Ndk::EntityHandle& entity = world.CreateEntity(); + Ndk::EntityHandle entity = world.CreateEntity(); Ndk::ListenerComponent& listenerComponent = entity->AddComponent(); Ndk::NodeComponent& nodeComponent = entity->AddComponent();