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

Gameplay.ACTION_FireWeapon


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
class ACTION_FireWeapon extends ScriptedAction;

var(Action) bool bPressFire;
var(Action) bool bPressAltFire;

function bool InitActionFor(ScriptedController C)
{
	local vector ShootLoc;
	
	if ( (C.Pawn == None) || (C.Pawn.Weapon == None) )
		return false;

	if ( bPressFire )
	{
		if ( C.Pawn.Weapon.IsA('BallLauncher') )
		{
			if ( C.Target != None )
				ShootLoc = C.Target.Location;
			else
				ShootLoc = C.Pawn.Location + 1500 * vector(C.Pawn.Rotation);
			C.Pawn.Weapon.ShootHoop(C,ShootLoc);
		}
		else
		{
			C.Pawn.Weapon.StartFire(0);
			C.bFire = 1;
		}
	}
	else
	{
		C.Pawn.Weapon.StopFire(0);
		C.bFire = 0;
	}
	
	if ( bPressAltFire )
	{
		C.Pawn.Weapon.StartFire(1);
		C.bAltFire = 1;
	}
	else
	{
		C.Pawn.Weapon.StopFire(1);
		C.bAltFire = 0;
	}
	C.bFineWeaponControl = bPressFire || bPressAltFire;
	return false;	
}

defaultproperties
{
	ActionString="fire weapon"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:28:50.000 - Creation time: Do 14.8.2014 09:58:33.488 - Created with UnCodeX