Ejemplo n.º 1
0
        public void UpdateInfo()
        {
            var extraDelayBuffer = ObjectCache.menuCache.cache["ExtraPingBuffer"].GetValue <Slider>().Value;

            serverPos2D      = hero.ServerPosition.To2D(); //CalculatedPosition.GetPosition(hero, Game.Ping);
            serverPos2DExtra = EvadeUtils.GetGamePosition(hero, Game.Ping + extraDelayBuffer);
            //CalculatedPosition.GetPosition(hero, Game.Ping + extraDelayBuffer);
            currentPosition = hero.Position.To2D(); //CalculatedPosition.GetPosition(hero, 0);
            boundingRadius  = hero.BoundingRadius;
            moveSpeed       = hero.MoveSpeed;
            isMoving        = hero.IsMoving;
        }
Ejemplo n.º 2
0
        public void UpdateInfo()
        {
            var extraDelayBuffer = 30;

            serverPos2D      = Player.Instance.ServerPosition.To2D(); //CalculatedPosition.GetPosition(hero, Game.Ping);
            serverPos2DExtra = EvadeUtils.GetGamePosition(Player.Instance, Game.Ping + extraDelayBuffer);
            serverPos2DPing  = EvadeUtils.GetGamePosition(Player.Instance, Game.Ping);
            //CalculatedPosition.GetPosition(hero, Game.Ping + extraDelayBuffer);
            currentPosition = Player.Instance.Position.To2D(); //CalculatedPosition.GetPosition(hero, 0);
            boundingRadius  = Player.Instance.BoundingRadius;
            moveSpeed       = Player.Instance.MoveSpeed;
            isMoving        = Player.Instance.IsMoving;
        }
Ejemplo n.º 3
0
        public static Vector2 GetGamePosition(AIHeroClient hero, float delay = 0)
        {
            if (hero != null)
            {
                if (hero.IsMoving)
                {
                    var path = new List <Vector2>();
                    path.Add(hero.ServerPosition.To2D());
                    path.AddRange(hero.Path.Select(point => point.To2D()));

                    var finalPath = EvadeUtils.CutPath(path, hero, delay);

                    return(finalPath.Last());
                }

                return(hero.ServerPosition.To2D());
            }

            return(Vector2.Zero);
        }
Ejemplo n.º 4
0
        private void Game_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
        {
            var hero = sender.Owner;

            checkPing = false;

            if (!hero.IsMe)
            {
                return;
            }

            lastSpellCastArgs = args;


            if (myHero.IsMoving && myHero.Path.Count() > 0)
            {
                lastSpellCastServerPos = EvadeUtils.GetGamePosition(myHero, Game.Ping);
                lastSpellCastEndPos    = myHero.Path.Last().To2D();
                checkPing = true;

                Draw.RenderObjects.Add(new Draw.RenderCircle(lastSpellCastServerPos, 1000, Color.Green, 10));
            }
        }