Skip to content

Commit 7aa8380

Browse files
committed
Remove legacy map handling, implement VMap and MMap systems
- Remove all legacy MangosSharp map format handling from TMapTile and WS_Maps, making GridMap (MangosZero format) the sole map reader - Remove legacy arrays (ZCoord, AreaFlag, AreaTerrain, WaterLevel), legacy resolution config (RESOLUTION_ZMAP), legacy interpolation, and legacy filename format (D3/XY -> D4/YX MangosZero format) - Implement VMap system for line-of-sight and collision detection: - BIH (Bounding Interval Hierarchy) spatial acceleration structure - WorldModel/GroupModel with Moller-Trumbore triangle intersection - ModelInstance with world-to-model coordinate transforms - StaticMapTree for per-map model instance management - VMapManager for LoS, height, and hit-position queries - Implement MMap pathfinding system using Detour navmesh: - DtNavMesh with tile loading and polygon spatial queries - DtNavMeshQuery with FindNearestPoly, FindPath, FindStraightPath - PathInfo for high-level pathfinding requests - MMapManager for navmesh tile loading and path computation - Wire VMap/MMap into WS_Maps: IsInLineOfSight, GetVMapHeight, and GetObjectHitPos now delegate to VMapManager when enabled - Clean up MapFileFormats: remove GetLegacyMapFileName https://claude.ai/code/session_0194PFFCeXmh82deGbisQtP2
1 parent 812219f commit 7aa8380

15 files changed

Lines changed: 2907 additions & 345 deletions

src/server/Mangos.World/Handlers/WS_CharMovement.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,11 +917,11 @@ public void UpdateCell(ref WS_PlayerData.CharacterObject Character)
917917
}
918918
short CellXAdd = -1;
919919
short CellYAdd = -1;
920-
if (WorldServiceLocator.WSMaps.GetSubMapTileX(Character.positionX) > 32)
920+
if (WorldServiceLocator.WSMaps.GetSubTileFraction(Character.positionX) > 0.5f)
921921
{
922922
CellXAdd = 1;
923923
}
924-
if (WorldServiceLocator.WSMaps.GetSubMapTileX(Character.positionY) > 32)
924+
if (WorldServiceLocator.WSMaps.GetSubTileFraction(Character.positionY) > 0.5f)
925925
{
926926
CellYAdd = 1;
927927
}

0 commit comments

Comments
 (0)