Beispiel #1
0
 // Token: 0x06000124 RID: 292 RVA: 0x00009D28 File Offset: 0x00007F28
 public static void NoteFiredProjectile(int projectileID, uint prefabID, int ammotype)
 {
     RangeAim.FiredProjectiles[projectileID] = new FiredProjectile
     {
         FiredTime = RangeAim.GetCurrentTime(),
         PrefabID  = prefabID,
         AmmoType  = ammotype
     };
 }
Beispiel #2
0
        // Token: 0x0600012A RID: 298 RVA: 0x0000A22C File Offset: 0x0000842C
        public static bool Manual(PlayerProjectileAttack attack)
        {
            bool flag = RangeAim.Instance.TargetPlayer != null;
            bool result;

            if (flag)
            {
                EHumanBone typeHit = OpCodes.GetTargetHit((EHumanBone)attack.playerAttack.attack.hitBone, Settings.Aimbot_Range_Manual_AutoHeadshot);
                RangeAim.SendRangeAttack(RangeAim.Instance.TargetPlayer, typeHit, attack, RangeAim.Instance.TargetPlayer.Position);
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
Beispiel #3
0
        // Token: 0x06000128 RID: 296 RVA: 0x0000A06C File Offset: 0x0000826C
        private static float GetTimeout(FiredProjectile projectile, float distance)
        {
            double maxVelocity = (double)OpCodes.GetMaxVelocity(projectile.AmmoType);
            bool   flag        = projectile.AmmoType > 0;

            if (flag)
            {
                maxVelocity *= (double)OpCodes.GetProjectileVelocityScale((EPrefabUID)projectile.PrefabID);
            }
            double y        = (double)(projectile.FiredTime + 1f);
            double z        = maxVelocity;
            double w        = (double)OpCodes.GetProjectileInitialDistance(projectile.AmmoType);
            double f        = (double)distance;
            double chisl    = -w + f + 1.5 * y * z - 0.0979899987578392 * z;
            double znam     = 1.5 * z;
            double drob     = chisl / znam;
            double normDrob = drob - (double)RangeAim.GetCurrentTime();

            return((float)normDrob);
        }
Beispiel #4
0
        // Token: 0x06000129 RID: 297 RVA: 0x0000A110 File Offset: 0x00008310
        public static bool Silent(PlayerProjectileAttack attack)
        {
            bool aimbot_Range_Manual_AutoHeadshot = Settings.Aimbot_Range_Manual_AutoHeadshot;

            if (aimbot_Range_Manual_AutoHeadshot)
            {
            }
            bool flag = RangeAim.Instance.TargetPlayer != null;
            bool result;

            if (flag)
            {
                EHumanBone typeHit     = OpCodes.GetTargetHit((EHumanBone)0u, Settings.Aimbot_Range_Manual_AutoHeadshot);
                Vector3    hitPosition = RangeAim.Instance.TargetPlayer.Position;
                float      distance    = Vector3.Distance(RangeAim.LocalPlayer.EyePos, hitPosition);
                float      distance2   = Vector3.Distance(RangeAim.LocalPlayer.Position, attack.playerAttack.attack.hitPositionWorld);
                float      timeout     = 0f;
                bool       flag2       = distance2 < distance;
                if (flag2)
                {
                    timeout = RangeAim.GetTimeout(RangeAim.FiredProjectiles[attack.playerAttack.projectileID], distance - distance2);
                }
                bool flag3 = timeout <= 0f;
                if (flag3)
                {
                    timeout = 0.001f;
                }
                BasePlayer             player     = RangeAim.Instance.TargetPlayer;
                PlayerProjectileAttack attackCopy = attack.Copy();
                Timer.SetTimeout(delegate
                {
                    RangeAim.SendRangeAttack(player, typeHit, attackCopy, hitPosition);
                }, timeout);
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
Beispiel #5
0
 public override void OnAwake()
 {
     Instance = this;
 }