## XIIIMP
Class FlashBangAmmo

source: C:\XIII\XIIIMP\Classes\FlashBangAmmo.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Inventory
             |
             +--Engine.Ammunition
                |
                +--XIII.XIIIAmmo
                   |
                   +--XIII.XIIIProjectilesAmmo
                      |
                      +--XIIIMP.FlashBangAmmo

Direct Known Subclasses:None

class FlashBangAmmo
extends XIII.XIIIProjectilesAmmo

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Function Summary
`void` | `SpawnProjectile(vector Start, rotator Dir)`
    //_____________________________________________________________________________

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class FlashBangAmmo extends XIIIProjectilesAmmo;
    00005
    00006	//_____________________________________________________________________________
    00007	function SpawnProjectile(vector Start, rotator Dir)
    00008	{
    00009	    local XIIIProjectile XP;
    00010
    00011	    if (AmmoAmount > 0)
    00012	      AmmoAmount -= 1;  // Fire
    00013	    else
    00014	      return;  // Empty Shot
    00015	    XP = XIIIProjectile(Spawn(ProjectileClass,owner,,Start,Dir));
    00016
    00017	    if ( XP != none )
    00018	    {
    00019	      XP.SetImpactNoise(SoftImpactNoise, ImpactNoise);
    00020	      if ( Pawn(Owner).IsPlayerPawn() )
    00021	        FlashBangFlying(XP).fLifeTime = FlashBang(Pawn(Owner).Weapon).ProjectileLifeTime - Level.TimeSeconds;
    00022	    }
    00023	}
    00024
    00025
    00026
    00027	defaultproperties
    00028	{
    00029	     fThrowDelay=0.090000
    00030	     MaxAmmo=15
    00031	     AmmoAmount=1
    00032	     ProjectileClass=Class'XIIIMP.FlashBangFlying'
    00033	     ImpactNoise=5.000000
    00034	     SoftImpactNoise=5.000000
    00035	     PickupClassName="XIIIMP.FlashBangPick"
    00036	     ItemName="FlashBang"
    00037	}

End Source Code