All pastes #2051090 Raw Edit

Anonymous

public text v1 · immutable
#2051090 ·published 2011-04-27 04:57 UTC
rendered paste body
simulated function FireAmmunition()
{
    local int x;
    if(!WeaponFireModes[CurrentFireMode].bZoomedFireMode)
	{
		// if this is the local player, play the firing effects
		PlayFiringSound();

    	// Use ammunition to fire
    	ConsumeAmmo( CurrentFireMode );

    	// Handle the different fire types
    	switch( WeaponFireModes[CurrentFireMode].FireType )
    	{
    		case EWFT_InstantHit:
    		    for(x = 0; x < WeaponFireModes[CurrentFireMode].InstantHitTraces; x++)
    			    InstantFire();
    			break;

    		case EWFT_Projectile:
    			ProjectileFire();
    			break;

    		case EWFT_Custom:
    			CustomFire();
    			break;
    	}

    	NotifyWeaponFired( CurrentFireMode );

		if (UTPawn(Instigator) != None)
		{
			UTPawn(Instigator).DeactivateSpawnProtection();
		}

		UTInventoryManager(InvManager).OwnerEvent('FiredWeapon');
	}
}