mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 23:08:31 +00:00
remove singleton for dpWorld (#1427)
Removes the singleton inheritance from dpWorld. Tested that crux prime, nimbus station, avant gardens and nexus tower still use navmeshes and physics and that physics volumes are still collided with.
This commit is contained in:
@@ -18,7 +18,7 @@ ProximityMonitorComponent::~ProximityMonitorComponent() {
|
||||
for (const auto& en : m_ProximitiesData) {
|
||||
if (!en.second) continue;
|
||||
|
||||
dpWorld::Instance().RemoveEntity(en.second);
|
||||
dpWorld::RemoveEntity(en.second);
|
||||
}
|
||||
|
||||
m_ProximitiesData.clear();
|
||||
@@ -28,12 +28,12 @@ void ProximityMonitorComponent::SetProximityRadius(float proxRadius, const std::
|
||||
dpEntity* en = new dpEntity(m_Parent->GetObjectID(), proxRadius);
|
||||
en->SetPosition(m_Parent->GetPosition());
|
||||
|
||||
dpWorld::Instance().AddEntity(en);
|
||||
dpWorld::AddEntity(en);
|
||||
m_ProximitiesData.insert(std::make_pair(name, en));
|
||||
}
|
||||
|
||||
void ProximityMonitorComponent::SetProximityRadius(dpEntity* entity, const std::string& name) {
|
||||
dpWorld::Instance().AddEntity(entity);
|
||||
dpWorld::AddEntity(entity);
|
||||
entity->SetPosition(m_Parent->GetPosition());
|
||||
m_ProximitiesData.insert(std::make_pair(name, entity));
|
||||
}
|
||||
|
Reference in New Issue
Block a user