Legacy:How Firing Doesn't Work

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search

This page illustrates a flow of control that is executed when the player hits the fire button. However, in practice this is NOT how weapon firing works! For that, see How UT2003 Weapons Work/Firing A Weapon.

The 'decoy' chain goes like this:

<uscript> exec function Fire( optional float F ) {

   if ( Level.Pauser == PlayerReplicationInfo )

} </uscript>

Here is easy: if the level is not in pause mode, call the Pawn's Fire function. If the level is paused and the person who paused it is the one who's firing, it unpauses the level but does not fire the weapon.

<uscript> function Fire( optional float F ) {

   if( Weapon!=None )

} </uscript>

Again, piece of cake: if the pawn has a weapon, call the weapon Fire function.

<uscript> simulated function Fire(float F) { } </uscript>

There's no code here! Normally you would expect to see the Fire method implemented in subclasses of Weapon. But none of the weapon classes actually implement this! At the time of writing, we don't believe this is used anywhere. See How UT2003 Weapons Work/Firing A Weapon for a more likely story.