I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX
UE2:WeaponFire (UT2004)
From Unreal Wiki, The Unreal Engine Documentation Site
Object >> WeaponFire |
Contents
- 1 Properties
- 1.1 Property group 'WeaponFire'
- 1.2 Internal variables
- 1.2.1 bInstantStop
- 1.2.2 bIsFiring
- 1.2.3 bNowWaiting
- 1.2.4 bServerDelayStartFire
- 1.2.5 bServerDelayStopFire
- 1.2.6 bTimerLoop
- 1.2.7 FireCount
- 1.2.8 Instigator
- 1.2.9 Level
- 1.2.10 NextFireTime
- 1.2.11 NextTimerPop
- 1.2.12 Owner
- 1.2.13 SavedFireProperties
- 1.2.14 ServerStartFireTime
- 1.2.15 TimerInterval
- 1.2.16 TransientSoundRadius
- 1.2.17 TransientSoundVolume
- 2 Enums
- 3 Functions
- 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 ()