moved vector3 to common

- changed distance checks to distance squared
- reexported central thanalan navmesh with cell size 0.60, height 0.26, radius 0.5, edge error 1.3, merged region size 30
- todo: main logic loop per zone and move this into proper ai classes
This commit is contained in:
Tahir Akhlaq 2017-06-11 02:29:08 +01:00
parent 872e56f8f9
commit c70cf022b7
9 changed files with 145 additions and 121 deletions

View file

@ -33,23 +33,20 @@ namespace FFXIVClassic_Map_Server.actors.area
public Zone(uint id, string zoneName, ushort regionId, string classPath, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid, bool loadNavMesh = false)
: base(id, zoneName, regionId, classPath, bgmDay, bgmNight, bgmBattle, isIsolated, isInn, canRideChocobo, canStealth, isInstanceRaid)
{
var navMeshName = loadNavMesh ? zoneName + ".snb" : "";
if (navMeshName != "")
if (loadNavMesh)
{
try
{
tiledNavMesh = utils.NavmeshUtils.LoadNavmesh(tiledNavMesh, navMeshName);
tiledNavMesh = utils.NavmeshUtils.LoadNavmesh(tiledNavMesh, zoneName + ".snb");
navMeshQuery = new SharpNav.NavMeshQuery(tiledNavMesh, 100);
if (tiledNavMesh != null)
if (tiledNavMesh != null && tiledNavMesh.Tiles[0].PolyCount > 0)
Program.Log.Info($"Loaded navmesh for {zoneName}");
}
catch (Exception e)
{
Program.Log.Error(e.Message);
}
}
}