Defines the Weapon entity type.
Inheritance: DynamicType
        public bool TakeWeapon( WeaponType weaponType )
        {
            int index = GetWeaponIndex( weaponType );
            if( index == -1 )
                return false;

            if( weapons[ index ].exists )
                return true;

            weapons[ index ].exists = true;

            SetActiveWeapon( index );

            return true;
        }
Example #2
0
 protected Quat GetFireRotation( WeaponType.WeaponMode typeMode )
 {
     return ( setForceFireRotation ? forceFireRotation : Rotation ) * typeMode.StartOffsetRotation;
 }
 public int GetWeaponIndex( WeaponType weaponType )
 {
     for( int n = 0; n < Type.Weapons.Count; n++ )
         if( Type.Weapons[ n ].WeaponType == weaponType )
             return n;
     return -1;
 }
Example #4
0
 protected Vec3 GetFirePosition( WeaponType.WeaponMode typeMode )
 {
     return Position + Rotation * typeMode.StartOffsetPosition;
 }