I'm a doctor, not a mechanic
Legacy:How Firing Doesn't Work
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:
- PlayerController.Fire
exec function Fire( optional float F ) { if ( Level.Pauser == PlayerReplicationInfo ) { SetPause(false); return; } Pawn.Fire(F); }
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.
- Pawn.Fire
function Fire( optional float F ) { if( Weapon!=None ) Weapon.Fire(F); }
Again, piece of cake: if the pawn has a weapon, call the weapon Fire function.
- Weapon.Fire
simulated function Fire(float F) { }
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.