Beispiel #1
0
 public EasyMover(PPather pather, Location target, bool GiveUpIfStuck, bool GiveUpIfUnsafe)
 {
     this.target = target;
     this.Me = BoogieCore.Player;
     this.world = pather.world;
     mover = PPather.mover;
     this.GiveUpIfStuck = GiveUpIfStuck;
     this.GiveUpIfUnsafe = GiveUpIfUnsafe;
     this.pather = pather;
 }
Beispiel #2
0
        GSpellTimer StuckTimeout = new GSpellTimer(333); // Check every 333ms

        #endregion Fields

        #region Constructors

        //Coordinate StuckLocation = null;
        public StuckDetecter(PPather pather, int stuckSensitivity, int abortSensitivity)
        {
            this.Me = BoogieCore.Player;
            this.stuckSensitivity = stuckSensitivity;
            this.abortSensitivity = abortSensitivity;
            this.mover = PPather.mover;
            firstStuckCheck = true;
        }
Beispiel #3
0
 public MoveAlonger(PPather pather, Path path)
 {
     this.Me = BoogieCore.Player;
     this.path = path;
     this.world = pather.world;
     mover = PPather.mover;
     sd = new StuckDetecter(pather, 1, 2);
     prev = null;
     current = path.GetFirst();
     next = path.GetSecond();
 }
Beispiel #4
0
        private void Startup()
        {
            RunState = RunState_e.Paused;
            WantedState = RunState_e.Running;

            BoogieCore.Log(LogType.System, "TotalMemory before " + System.GC.GetTotalMemory(true) / (1024 * 1024) + " MB");

            WasAt = null;

            string zone = FigureOutZone();

            MPQTriangleSupplier mpq = new MPQTriangleSupplier();
            CurrentContinent = mpq.SetZone(zone);

            BoogieCore.Log(LogType.System, "Zone is : " + zone);
            BoogieCore.Log(LogType.System, "Continent is : " + CurrentContinent);

            string myFaction = "Unknown";

            ChunkedTriangleCollection triangleWorld = new ChunkedTriangleCollection(512);
            triangleWorld.SetMaxCached(9);
            triangleWorld.AddSupplier(mpq);

            world = new PathGraph(CurrentContinent, triangleWorld, null);
            mover = new Mover();
            radar = new UnitRadar();
            BoogieCore.Log(LogType.System, "Pather loaded!");

            while (ShouldRun)
            {
                Thread.Sleep(100);
            }
        }