Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE2:WeaponFire (UT2004)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 Object >> WeaponFire
Package: 
Engine
Direct subclasses:
InstantFire, BallTarget, FM_Turret_Minigun_AltFire, FM_Turret_AltFire_Shield, ONSAVRiLAltFire, LinkFire, ONSGrenadeAltFire, ONSMineLayerAltFire, PainterFire, PainterZoom, ProjectileFire, ShieldAltFire, ShieldFire, SniperZoom, TransRecall
This class in other games:
UT2003

Abstract base class for weapon fire mode implementations.

Properties[edit]

Property group 'WeaponFire'[edit]

See WeaponFire property group WeaponFire.

Internal variables[edit]

bInstantStop[edit]

Type: bool


bIsFiring[edit]

Type: bool


bNowWaiting[edit]

Type: bool


bServerDelayStartFire[edit]

Type: bool


bServerDelayStopFire[edit]

Type: bool


bTimerLoop[edit]

Type: bool


FireCount[edit]

Type: int


Instigator[edit]

Type: Pawn


Level[edit]

Type: LevelInfo


NextFireTime[edit]

Type: float


NextTimerPop[edit]

Type: float


Owner[edit]

Type: Actor


SavedFireProperties[edit]

Type: Actor.FireProperties


ServerStartFireTime[edit]

Type: float


TimerInterval[edit]

Type: float


TransientSoundRadius[edit]

Type: float


Default value: 400.0

TransientSoundVolume[edit]

Type: float


Default value: 0.5

Enums[edit]

ESpreadStyle[edit]

SS_None 
SS_Random 
spread is max random angle deviation
SS_Line 
spread is angle between each projectile
SS_Ring 

Functions[edit]

Native code[edit]

Fire mode updating[edit]

void UWeaponFire::ModeTick( FLOAT DeltaSeconds )
{
	guard(UWeaponFire::ModeTick);
 
	if ( !Weapon || Weapon->bDeleteMe || !Instigator || Instigator->bDeleteMe )
		return;
 
	// WeaponFire timer
	if ( TimerInterval != 0.f )
	{
		if ( NextTimerPop < Level->TimeSeconds )
		{
			eventTimer();
			if ( bTimerLoop )
				NextTimerPop = NextTimerPop + TimerInterval;
			else
				TimerInterval = 0.f;
		}
	}
 
	eventModeTick(DeltaSeconds);
 
	FLOAT CurrentTime = Weapon->Level->TimeSeconds;
 
	if ( (bIsFiring && !bFireOnRelease)
		|| ((bInstantStop || !bIsFiring) && bFireOnRelease)
		|| (HoldTime > MaxHoldTime && MaxHoldTime > 0.0f) )
	{
		if (CurrentTime > NextFireTime && (bInstantStop || !bNowWaiting) )
		{
			eventModeDoFire();
 
			if (bWaitForRelease)
				bNowWaiting = true;
		}
	}
	else if (bWaitForRelease && CurrentTime >= NextFireTime)
	{
		bNowWaiting = false;
 
		if (HoldTime == 0.0f)
			eventModeHoldFire();
 
		HoldTime += DeltaSeconds;
	}
	bInstantStop = false;
	unguard;
}

Events[edit]

ModeDoFire[edit]

event ModeDoFire ()


ModeHoldFire[edit]

event ModeHoldFire ()


ModeTick[edit]

event ModeTick (float dt)


SetInitialState[edit]

simulated event SetInitialState ()


Timer[edit]

event Timer ()


Other instance functions[edit]

See WeaponFire instance functions.