## XIIIMP
Class MPBombAmmo

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

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

Direct Known Subclasses:None

class MPBombAmmo
extends XIII.XIIIProjectilesAmmo

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

Variables
`sound` | `sndBombIsDropped`

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

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class MPBombAmmo extends XIIIProjectilesAmmo;
    00005
    00006	var sound sndBombIsDropped;
    00007
    00008	//_____________________________________________________________________________
    00009	function RemoveHarnaisBomb(XIIIPawn P)
    00010	{
    00011	    local Inventory NewItem;
    00012
    00013	    NewItem = P.FindInventoryType(Class'XIIIMP.HarnaisBomb');
    00014	    if( NewItem != none )
    00015	      NewItem.Destroy();
    00016
    00017	    NewItem = P.FindInventoryType(Class'XIIIMP.HarnaisBombAttachment');
    00018	    if( NewItem !=None )
    00019	      NewItem.Destroy();
    00020	}
    00021
    00022	//_____________________________________________________________________________
    00023	function SpawnProjectile(vector Start, rotator Dir)
    00024	{
    00025	    local XIIIProjectile XP;
    00026
    00027	    if (AmmoAmount > 0)
    00028	      AmmoAmount -= 1;  // Fire
    00029	    else
    00030	      return;  // Empty Shot
    00031	    XP = XIIIProjectile(Spawn(ProjectileClass,owner,,Start,Dir));
    00032	    //owner.PlayMenu(sndBombIsDropped);
    00033
    00034	    RemoveHarnaisBomb( XIIIPawn(owner) );
    00035
    00036	    if ( XP != none )
    00037	    {
    00038	      XP.SetImpactNoise(SoftImpactNoise, ImpactNoise);
    00039	//      if ( Pawn(Owner).IsPlayerPawn() )
    00040	//        GrenadFlying(XP).fLifeTime = GrenadB(Pawn(Owner).Weapon).ProjectileLifeTime - Level.TimeSeconds;
    00041	    }
    00042	}
    00043
    00044
    00045
    00046	defaultproperties
    00047	{
    00048	     sndBombIsDropped=Sound'XIIIsound.Multi__SFXMulti.SFXMulti__hBombArmored'
    00049	     fThrowDelay=1.150000
    00050	     MaxAmmo=15
    00051	     AmmoAmount=1
    00052	     ProjectileClass=Class'XIIIMP.MPBombFlying'
    00053	     ImpactNoise=5.000000
    00054	     SoftImpactNoise=5.000000
    00055	     PickupClassName="XIIIMP.XIIIMPBombPick"
    00056	     ItemName="Bomb"
    00057	}

End Source Code