Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

U2Weapons.weaponGrenadeLauncher


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
//=============================================================================
// $Workfile: weaponGrenadeLauncher.uc $
// Created By: Jess Crable, Mark Poesch
// Created On: 5/2/00
// $Author: Aleiby $
// $Date: 11/24/02 12:53a $
// $Revision: 8 $
//=============================================================================
class weaponGrenadeLauncher extends U2WeaponPickup;

#exec OBJ LOAD File=..\StaticMeshes\MalekythM.usx

var() int	AmmoCountConcussion,
			AmmoCountEMP,
			AmmoCountFragment,
			AmmoCountIncendiary,
			AmmoCountSmoke,
			AmmoCountToxic;

function bool MaybeAddMoreAmmo(Weapon W, Pawn Other)
{
	local WeaponInvGrenadeLauncher GL;
	local int i;

	GL = WeaponInvGrenadeLauncher(W);
	if(GL?)
	{
		for(i=0;i<AmmoCountFragment;i++)
			GL.GiveMoreAmmo( Other, class'ammoInvGrenadeFragment' );
		for(i=0;i<AmmoCountIncendiary;i++)
			GL.GiveMoreAmmo( Other, class'ammoInvGrenadeIncendiary' );
		for(i=0;i<AmmoCountToxic;i++)
			GL.GiveMoreAmmo( Other, class'ammoInvGrenadeToxic' );
		for(i=0;i<AmmoCountEMP;i++)
			GL.GiveMoreAmmo( Other, class'ammoInvGrenadeEMP' );
		for(i=0;i<AmmoCountConcussion;i++)
			GL.GiveMoreAmmo( Other, class'ammoInvGrenadeConcussion' );
		for(i=0;i<AmmoCountSmoke;i++)
			GL.GiveMoreAmmo( Other, class'ammoInvGrenadeSmoke' );
	}

	return (AmmoCountFragment>0 || AmmoCountIncendiary>0 || AmmoCountToxic>0 || AmmoCountEMP>0 || AmmoCountConcussion>0 || AmmoCountSmoke>0);
}

function InitDroppedPickupFor(Inventory Inv)
{
	local WeaponInvGrenadeLauncher GL;
	local ammoInvGrenade G;

	GL = WeaponInvGrenadeLauncher(Inv);
	if(GL?)
	{
		AmmoCountConcussion		= GetAmmoCount(GL,class'ammoInvGrenadeConcussion');
		AmmoCountEMP			= GetAmmoCount(GL,class'ammoInvGrenadeEMP');
		AmmoCountFragment		= GetAmmoCount(GL,class'ammoInvGrenadeFragment');
		AmmoCountIncendiary		= GetAmmoCount(GL,class'ammoInvGrenadeIncendiary');
		AmmoCountSmoke			= GetAmmoCount(GL,class'ammoInvGrenadeSmoke');
		AmmoCountToxic			= GetAmmoCount(GL,class'ammoInvGrenadeToxic');
	}
}

function int GetAmmoCount( WeaponInvGrenadeLauncher GL, class<ammoInvGrenade> GrenadeClass )
{
	local ammoInvGrenade G;
	G = GL.GrenadeTypes[ GrenadeClass.default.GrenadeIndex ];
//	if (G?)	return (G.AmmoAmount/G.default.AmmoAmount) + 1;
	if (G?) return 1;
	else	return 0;
}

defaultproperties
{
	AmmoCountConcussion=1
	AmmoCountEMP=1
	AmmoCountFragment=1
	AmmoCountIncendiary=1
	AmmoCountSmoke=1
	AmmoCountToxic=1
     BounceSounds(0)="U2A.Landed.Metal"
	InventoryType=Class'U2Weapons.weaponInvGrenadeLauncher'
	PickupMessage="You got a Grenade Launcher."
	PickupSound=Sound'U2WeaponsA.GrenadeLauncher.GL_Pickup'
	StaticMesh=StaticMesh'MalekythM.Pickups.GL_TP_W'
     UseReticleOnEvents(0)="UseReticleText"
     UseReticleOnEvents(1)="UseReticleCorners"
     UseReticleOnEvents(2)="UseReticleTopBars"
     ProximityReticleOnEvents(0)="ProximityReticleCorners"
     ProximityReticleOnEvents(1)="ProximityReticleTopBars"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: sk 3-1-2016 10:38:42.000 - Creation time: sk 3-1-2016 10:48:43.857 - Created with UnCodeX