public FlightPath(Vector3 start, Vector3 end, IFlightNavigationArgs flightNavigationArgs, ushort zoneId = 0) { this.zoneId = zoneId == 0 ? WorldManager.ZoneId : zoneId; this.flightNavigationArgs = flightNavigationArgs; startCenterOfCube = GetCenterOfCube(start, flightNavigationArgs.Radius); endCenterOfCube = GetCenterOfCube(end, flightNavigationArgs.Radius); Start = start; End = end; }
public FlightEnabledNavigator( NavigationProvider innerNavigator, IFlightEnabledPlayerMover playerMover, IFlightNavigationArgs flightNavigationArgs) : base(innerNavigator) { logger = new Logger(new FlightEnabledNavigatorLogColors(), "FlightNav"); this.playerMover = playerMover; this.flightNavigationArgs = flightNavigationArgs; Navigator.NavigationProvider = this; CurrentPath = new FlightPath(Vector3.Zero, Vector3.Zero, flightNavigationArgs); logger.Verbose(Localization.Localization.FlightEnabledNavigator_Enabled); }
public FlightEnabledNavigator( INavigationProvider innerNavigator, IFlightEnabledPlayerMover playerMover, IFlightNavigationArgs flightNavigationArgs) { logger = new Logger(this); this.innerNavigator = innerNavigator; this.playerMover = playerMover; this.flightNavigationArgs = flightNavigationArgs; Navigator.NavigationProvider = this; CurrentPath = new FlightPath(Vector3.Zero, Vector3.Zero, flightNavigationArgs); logger.Verbose(Localization.Localization.FlightEnabledNavigator_Enabled); }
public FlightEnabledNavigator( INavigationProvider innerNavigator, IFlightEnabledPlayerMover playerMover, IFlightNavigationArgs flightNavigationArgs) { this.logger = new Logger(this); this.innerNavigator = innerNavigator; this.playerMover = playerMover; this.flightNavigationArgs = flightNavigationArgs; Navigator.NavigationProvider = this; CurrentPath = new FlightPath(Vector3.Zero, Vector3.Zero, flightNavigationArgs); logger.Verbose("Replacing Navigator with Flight Navigator."); }
public bool Equals(Vector3 start, Vector3 end, IFlightNavigationArgs args) { if (Math.Abs(flightNavigationArgs.ForcedAltitude - args.ForcedAltitude) > float.Epsilon) { return(false); } if (Math.Abs(flightNavigationArgs.Smoothing - args.Smoothing) > float.Epsilon) { return(false); } if (Math.Abs(flightNavigationArgs.InverseParabolicMagnitude - args.InverseParabolicMagnitude) > float.Epsilon) { return(false); } return(start.Distance3D(Start) < args.Radius / 2 && end.Distance3D(End) < args.Radius / 2); }
public static Guid GetKey(Vector3 start, Vector3 end, IFlightNavigationArgs args) { return(GetKey(new FlightPath(start, end, args))); }
public StraightOrParabolicFlightPath(Vector3 start, Vector3 end, IFlightNavigationArgs flightNavigationArgs) : base(start, end, flightNavigationArgs) { }