diff --git a/server/gameserver/navmeshbuilder.cc b/server/gameserver/navmeshbuilder.cc index 72ea4cf..06147b6 100644 --- a/server/gameserver/navmeshbuilder.cc +++ b/server/gameserver/navmeshbuilder.cc @@ -21,49 +21,6 @@ #include "navmeshhelper.h" -struct BuilderParams -{ - float kCellSize = 64; - const float kCellHeight = 64; - const float kAgentMaxSlope = 90; - const float kAgentHeight = 1; - const float kAgentMaxClimb = 1; - const float kAgentRadius = 40; - - const float kEdgeMaxLen = 6; - const float kEdgeMaxError = 6; - - const float kRegionMinSize = 6; - const float kRegionMergeSize = 6; - - const int kVertsPerPoly = 1; - - const int kTileSize = 48; - - const float kDetailSampleDist = 1; - const float kDetailSampleMaxError = 1; - - const int kMaxTiles = 0; - const int kMaxPolysPerTile = 0; - - const float* bmin = nullptr; - const float* bmax = nullptr; - rcConfig cfg; - dtTileCacheParams tcparams; - MapInstance* map_instance = nullptr; - LinearAllocator* talloc = nullptr; - FastLZCompressor* tcomp = nullptr; - MeshProcess* tmproc = nullptr; - dtTileCache* tile_cache = nullptr; - dtNavMesh* navmesh = nullptr; - int gw = 0; - int gh = 0; - - int ts = 0; - int tw = 0; - int th = 0; -}; - void NavMeshBuilder::Init() { diff --git a/server/gameserver/navmeshhelper.h b/server/gameserver/navmeshhelper.h index ec987f1..733c4dd 100644 --- a/server/gameserver/navmeshhelper.h +++ b/server/gameserver/navmeshhelper.h @@ -234,3 +234,46 @@ struct MeshProcess : public dtTileCacheMeshProcess #endif } }; + +struct BuilderParams +{ + float kCellSize = 64; + const float kCellHeight = 64; + const float kAgentMaxSlope = 90; + const float kAgentHeight = 1; + const float kAgentMaxClimb = 1; + const float kAgentRadius = 40; + + const float kEdgeMaxLen = 6; + const float kEdgeMaxError = 6; + + const float kRegionMinSize = 6; + const float kRegionMergeSize = 6; + + const int kVertsPerPoly = 1; + + const int kTileSize = 48; + + const float kDetailSampleDist = 1; + const float kDetailSampleMaxError = 1; + + const int kMaxTiles = 0; + const int kMaxPolysPerTile = 0; + + const float* bmin = nullptr; + const float* bmax = nullptr; + rcConfig cfg; + dtTileCacheParams tcparams; + MapInstance* map_instance = nullptr; + LinearAllocator* talloc = nullptr; + FastLZCompressor* tcomp = nullptr; + MeshProcess* tmproc = nullptr; + dtTileCache* tile_cache = nullptr; + dtNavMesh* navmesh = nullptr; + int gw = 0; + int gh = 0; + + int ts = 0; + int tw = 0; + int th = 0; +};