mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-26 04:18:22 +02:00
Refactored how zones work. Cleaned out a lot of duplciations and smoothed out how Zones/PrivateAreas work.
This commit is contained in:
parent
56ba641e2a
commit
563118372a
32 changed files with 247 additions and 417 deletions
|
@ -55,17 +55,17 @@ namespace Meteor.Map.actors.chara.ai
|
|||
{
|
||||
PreparePath(dest.X, dest.Y, dest.Z, stepSize, maxPath, polyRadius);
|
||||
}
|
||||
|
||||
//TODO: Verify pathfind with new area setup
|
||||
public void PreparePath(float x, float y, float z, float stepSize = 1.25f, int maxPath = 40, float polyRadius = 0.0f)
|
||||
{
|
||||
var pos = new Vector3(owner.positionX, owner.positionY, owner.positionZ);
|
||||
var dest = new Vector3(x, y, z);
|
||||
|
||||
Zone zone;
|
||||
if (owner.GetZone() is PrivateArea || owner.GetZone() is PrivateAreaContent)
|
||||
zone = (Zone)((PrivateArea)owner.GetZone()).GetParentZone();
|
||||
if (owner.CurrentArea is PrivateArea || owner.CurrentArea is PrivateAreaContent)
|
||||
zone = (Zone)((PrivateArea)owner.CurrentArea).GetParentZone();
|
||||
else
|
||||
zone = (Zone)owner.GetZone();
|
||||
zone = (Zone)owner.CurrentArea;
|
||||
|
||||
var sw = new System.Diagnostics.Stopwatch();
|
||||
sw.Start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue