Fix checks for if the physics world is loaded (#711)

This commit is contained in:
Jett 2022-08-05 13:41:07 +01:00 committed by GitHub
parent 408163ed35
commit 4112a85906
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,9 @@ public:
float GetHeightAtPoint(const NiPoint3& location);
std::vector<NiPoint3> GetPath(const NiPoint3& startPos, const NiPoint3& endPos, float speed = 10.0f);
class dtNavMesh* GetdtNavMesh() { return m_NavMesh; }
private:
void LoadNavmesh();

View File

@ -24,7 +24,7 @@ public:
~dpWorld();
bool ShouldUseSP(unsigned int zoneID);
bool IsLoaded() const { return m_NavMesh != nullptr; }
bool IsLoaded() const { return m_NavMesh->GetdtNavMesh() != nullptr; }
void StepWorld(float deltaTime);