## XIIIMP
Class XIIIMPSniperArena

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

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Info
             |
             +--Engine.Mutator
                |
                +--XIIIMP.XIIIMPMutator
                   |
                   +--XIIIMP.XIIIMPSniperArena

Direct Known Subclasses:XIIIMPBazookArena, XIIIMPGrenadArena

class XIIIMPSniperArena
extends XIIIMP.XIIIMPMutator

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

Variables
`class` | `DefaultAmmoPickupClass` to replace ammo picks by default one
`string` | `DefaultAmmoPickupName` to replace ammo picks by default one

Function Summary
`bool` | `CheckReplacement(Actor Other, out byte)`
    //_____________________________________________________________________________

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class XIIIMPSniperArena extends XIIIMPMutator;
    00005
    00006	var string DefaultAmmoPickupName; // to replace ammo picks by default one
    00007	var class<Actor> DefaultAmmoPickupClass;
    00008
    00009	//_____________________________________________________________________________
    00010	event PreBeginPlay()
    00011	{
    00012	    DefaultAmmoPickupClass = Class<Actor>(DynamicLoadObject(DefaultAmmoPickupName, class'class'));
    00013	}
    00014
    00015	//_____________________________________________________________________________
    00016	function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
    00017	{
    00018	    if ( DBMutator ) Log("MUTATOR CheckReplacement for"@Other);
    00019
    00020	    // replace all weapons by ammo
    00021	    if ( XIIIWeaponPickup(Other) != none )
    00022	      ReplaceWith(Other, DefaultAmmoPickupName);
    00023	    // delete all ammo except for the weapon.
    00024	    if ( (XIIIAmmoPick(Other) != none) && (Other.Class != DefaultAmmoPickupClass) )
    00025	      Other.Destroy();
    00026
    00027	    return true;
    00028	}
    00029
    00030
    00031
    00032	defaultproperties
    00033	{
    00034	     defaultAmmoPickupName="XIII.Bmg50AmmoClip"
    00035	     DefaultWeaponName="XIII.FusilSnipe"
    00036	}

End Source Code