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; }
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; }
protected Vec3 GetFirePosition( WeaponType.WeaponMode typeMode ) { return Position + Rotation * typeMode.StartOffsetPosition; }