mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user