public void ShootMissile(Vector3 velocity)
        {
            //  Play missile launch cue (one-time)
            StartSound(m_gunBase.ShootSound);

            m_gunBase.Shoot(velocity);
        }
예제 #2
0
        //protected float GetDeviatedAngleByDamageRatio()
        //{
        //    MyPrefabLargeWeapon prefabLargeWeapon = GetWeaponBase().PrefabParent;
        //    if (MySession.PlayerShip != null &&
        //       MyFactions.GetFactionsRelation(prefabLargeWeapon, MySession.PlayerShip) == MyFactionRelationEnum.Enemy)
        //    {
        //        float degrees = (float)Math.Pow(120, prefabLargeWeapon.GetDamageRatio() * 1.5 - 1.2) * 4f;
        //        return MathHelper.ToRadians(degrees);
        //    }
        //    return 0f;
        //}

        protected void Shoot(Vector3 muzzlePosition)
        {
            Vector3 projectileForwardVector = m_entity.WorldMatrix.Forward;
            Vector3 velocity = m_turretBase.Parent.Physics.LinearVelocity;

            GetWeaponBase().RemoveAmmoPerShot();
            m_gunBase.Shoot(velocity);
        }