Ndk/BaseComponent: Fix crash
(Also fix ugly hackfix) Former-commit-id: b176fb3abc0f541765658376fdd086241c94e279
This commit is contained in:
parent
30ba25168f
commit
cab52dfcfd
|
|
@ -7,15 +7,13 @@
|
|||
#ifndef NDK_BASECOMPONENT_HPP
|
||||
#define NDK_BASECOMPONENT_HPP
|
||||
|
||||
#include <NDK/Prerequesites.hpp>
|
||||
#include <NDK/EntityHandle.hpp>
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
class Entity;
|
||||
|
||||
class NDK_API BaseComponent
|
||||
{
|
||||
friend Entity;
|
||||
|
|
@ -38,7 +36,7 @@ namespace Ndk
|
|||
|
||||
protected:
|
||||
ComponentIndex m_componentIndex;
|
||||
Entity* m_entity;
|
||||
EntityHandle m_entity;
|
||||
|
||||
static ComponentIndex RegisterComponent(ComponentId id, Factory factoryFunc);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ namespace Ndk
|
|||
{
|
||||
if (addDefaultSystems)
|
||||
AddDefaultSystems();
|
||||
|
||||
m_entities.reserve(100); // Temporaire, je le jure
|
||||
}
|
||||
|
||||
inline BaseSystem& World::AddSystem(std::unique_ptr<BaseSystem>&& system)
|
||||
|
|
|
|||
Loading…
Reference in New Issue