summaryrefslogtreecommitdiffstats
path: root/source/Entity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Entity.cpp')
-rw-r--r--source/Entity.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/Entity.cpp b/source/Entity.cpp
index 2c822d0cc..8afdfdb95 100644
--- a/source/Entity.cpp
+++ b/source/Entity.cpp
@@ -129,14 +129,22 @@ const char * cEntity::GetParentClass(void) const
-void cEntity::Initialize(cWorld * a_World)
+bool cEntity::Initialize(cWorld * a_World)
{
+ if (cPluginManager::Get()->CallHookSpawningEntity(*a_World, *this))
+ {
+ return false;
+ }
+
LOGD("Initializing entity #%d (%s) at {%.02f, %.02f, %.02f}",
m_UniqueID, GetClass(), m_Pos.x, m_Pos.y, m_Pos.z
);
m_IsInitialized = true;
m_World = a_World;
m_World->AddEntity(this);
+
+ cPluginManager::Get()->CallHookSpawnedEntity(*a_World, *this);
+ return true;
}