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:
David Markowitz
2024-01-19 13:12:05 -08:00
committed by GitHub
parent ea5360cb99
commit 36f7b8a928
13 changed files with 85 additions and 82 deletions

View File

@@ -17,6 +17,7 @@
#include "eTriggerCommandType.h"
#include "eTriggerEventType.h"
#include "dNavMesh.h"
Zone::Zone(const LWOMAPID& mapID, const LWOINSTANCEID& instanceID, const LWOCLONEID& cloneID) :
m_ZoneID(mapID, instanceID, cloneID) {
@@ -463,9 +464,9 @@ void Zone::LoadPath(std::istream& file) {
// We verify the waypoint heights against the navmesh because in many movement paths,
// the waypoint is located near 0 height,
if (path.pathType == PathType::Movement) {
if (dpWorld::Instance().IsLoaded()) {
if (dpWorld::IsLoaded()) {
// 2000 should be large enough for every world.
waypoint.position.y = dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(waypoint.position, 2000.0f);
waypoint.position.y = dpWorld::GetNavMesh()->GetHeightAtPoint(waypoint.position, 2000.0f);
}
}
path.pathWaypoints.push_back(waypoint);