| 132 | |
| 133 | |
| 134 | bool cEntity::Initialize(cWorld * a_World) |
| 135 | { |
| 136 | if (cPluginManager::Get()->CallHookSpawningEntity(*a_World, *this)) |
| 137 | { |
| 138 | return false; |
| 139 | } |
| 140 | |
| 141 | /* |
| 142 | // DEBUG: |
| 143 | LOGD("Initializing entity #%d (%s) at {%.02f, %.02f, %.02f}", |
| 144 | m_UniqueID, GetClass(), m_Pos.x, m_Pos.y, m_Pos.z |
| 145 | ); |
| 146 | */ |
| 147 | |
| 148 | m_IsInitialized = true; |
| 149 | m_World = a_World; |
| 150 | m_World->AddEntity(this); |
| 151 | |
| 152 | cPluginManager::Get()->CallHookSpawnedEntity(*a_World, *this); |
| 153 | |
| 154 | // Spawn the entity on the clients: |
| 155 | a_World->BroadcastSpawnEntity(*this); |
| 156 | |
| 157 | return true; |
| 158 | } |
| 159 | |
| 160 | |
| 161 |
nothing calls this directly
no test coverage detected