1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-21 04:07:48 +00:00

adjusted roam radius slightly

This commit is contained in:
Tahir Akhlaq 2017-06-07 02:12:27 +01:00
parent e09cb197b3
commit dd552ba69d

View file

@ -150,6 +150,9 @@ namespace FFXIVClassic_Map_Server.Actors
sw.Stop(); sw.Stop();
((Zone)zone).pathCalls++; ((Zone)zone).pathCalls++;
((Zone)zone).pathCallTime += sw.ElapsedMilliseconds; ((Zone)zone).pathCallTime += sw.ElapsedMilliseconds;
if (path.Count == 1)
Program.Log.Error($"mypos: {positionX} {positionY} {positionZ} | targetPos: {x} {y} {z} | step {stepSize} | maxPath {maxPath} | polyRadius {polyRadius}");
Program.Log.Error("[{0}][{1}] Created {2} points in {3} milliseconds", actorId, actorName, path.Count, sw.ElapsedMilliseconds); Program.Log.Error("[{0}][{1}] Created {2} points in {3} milliseconds", actorId, actorName, path.Count, sw.ElapsedMilliseconds);
} }
} }
@ -233,7 +236,7 @@ namespace FFXIVClassic_Map_Server.Actors
var spawnDistance = Utils.Distance(positionX, positionY, positionZ, oldPositionX, oldPositionY, oldPositionZ); var spawnDistance = Utils.Distance(positionX, positionY, positionZ, oldPositionX, oldPositionY, oldPositionZ);
// despawn if too far from spawn so client can reload me // despawn if too far from spawn so client can reload me
if (spawnDistance >= 63) if (spawnDistance >= 64.4)
{ {
despawnOutOfRange = true; despawnOutOfRange = true;
@ -347,9 +350,7 @@ namespace FFXIVClassic_Map_Server.Actors
// within spawn range, find a random point // within spawn range, find a random point
else if (diffMove.Seconds >= 15 && !hasMoved) else if (diffMove.Seconds >= 15 && !hasMoved)
{ {
// this shit gets hit every time, but it wont path to it? PathTo(oldPositionX, oldPositionY, oldPositionZ, 2.5f, 7, 10.5f);
Program.Log.Error("{0} Picking random point to walk to!", actorId);
PathTo(oldPositionX, oldPositionY, oldPositionZ, 2.5f, 7, 15.5f);
// face destination // face destination
if (positionUpdates.Count > 0) if (positionUpdates.Count > 0)