## XIII
Class DecoAmmo

source: C:\XIII\XIII\Classes\DecoAmmo.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Inventory
             |
             +--Engine.Ammunition
                |
                +--XIII.XIIIAmmo
                   |
                   +--XIII.XIIIH2HAmmo
                      |
                      +--XIII.DecoAmmo

Direct Known Subclasses:DecoBroomAmmo, DecoCueAmmo

class DecoAmmo
extends XIII.XIIIH2HAmmo

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

Variables
`DecoWeapon` | `DW`
`int` | `bBrokenOnTgt`
`bool` | `bUnused`

Function Summary
`void` | `ProcessTraceHit(Weapon W, Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)`
    //_____________________________________________________________________________
    // ELR No Ammo used by fists

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class DecoAmmo extends XIIIH2HAmmo;
    00005
    00006	var bool bUnused;
    00007	var int bBrokenOnTgt;
    00008	var DecoWeapon DW;
    00009
    00010	//_____________________________________________________________________________
    00011	// ELR No Ammo used by fists
    00012	function ProcessTraceHit(Weapon W, Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
    00013	{
    00014	    Super.ProcessTraceHit( W, Other, HitLocation, HitNormal, X, Y, Z);
    00015	    bUnused = false;
    00016	    DW = DecoWeapon(W);
    00017	//    Log("DecoWeapon using");
    00018	//    Spawn(class'DecoImpactEmitter',self,,HitLocation, rotator(X));
    00019	    if ( DW.fDelaySFXBroken > 0.0 )
    00020	    {
    00021	      SetTimer2(DW.fDelaySFXBroken, false);
    00022	      if ( Pawn(Other) != none )
    00023	        bBrokenOnTgt = 2;
    00024	      else if ( Other != none )
    00025	        bBrokenOnTgt = 1;
    00026	      else
    00027	        bBrokenOnTgt = 0;
    00028	    }
    00029	    else
    00030	    {
    00031	      if ( Pawn(Other) != none )
    00032	        Spawn(DW.SFXWhenBroken,self,,DW.Location+vector(DW.owner.rotation)*120.0, DW.owner.rotation);
    00033	      else if ( other != none )
    00034	        Spawn(DW.SFXWhenBrokenNotPawn,self,,DW.Location+vector(DW.owner.rotation)*120.0, DW.owner.rotation);
    00035	      else
    00036	        Spawn(DW.SFXWhenBrokenNoTgt,self,,DW.Location+vector(DW.owner.rotation)*120.0, DW.owner.rotation);
    00037	    }
    00038	}
    00039
    00040	//_____________________________________________________________________________
    00041	event Timer2()
    00042	{
    00043	    if ( bBrokenOnTgt == 2 )
    00044	      Spawn(DW.SFXWhenBroken,self,,DW.Location+vector(DW.owner.rotation)*120.0, DW.owner.rotation);
    00045	    else if ( bBrokenOnTgt == 1 )
    00046	      Spawn(DW.SFXWhenBrokenNotPawn,self,,DW.Location+vector(DW.owner.rotation)*120.0, DW.owner.rotation);
    00047	    else
    00048	      Spawn(DW.SFXWhenBrokenNoTgt,self,,DW.Location+vector(DW.owner.rotation)*120.0, DW.owner.rotation);
    00049	    DW.DetachFromPawn(DW.Instigator);
    00050	}
    00051
    00052
    00053	defaultproperties
    00054	{
    00055	     bUnused=True
    00056	     H2HDamages=20
    00057	     MyDamageType=Class'XIII.DTSureStunned'
    00058	     ImpactNoise=0.420000
    00059	     SoftImpactNoise=0.420000
    00060	     fFireDelay=0.200000
    00061	     bTravel=False
    00062	}

End Source Code