Navigation

 Rate of Fire Feature Type: Coding Tutorials     Added: 05/01  
  Author: Corven 

You can easily tweak how fast each weapon becomes ready to fire again.

Ready to fire

Code to be Added or Changed

bg_pmove.c

The following lines are what determines the rate of fire for each weapon, the lower the value, the less time it takes to reload, hence the faster it will reload and be ready to fire again.

Look for the PM_Weapon function and scroll down to these lines:

// fire weapon,
PM_AddEvent( EV_FIRE_WEAPON );
switch( pm->ps->weapon ) {
default:
case WP_GAUNTLET:
addTime = 400;
break;
case WP_LIGHTNING:
addTime = 50;
break;
case WP_SHOTGUN:
addTime = 1000;
break;
case WP_MACHINEGUN:
addTime = 100;
break;
case WP_GRENADE_LAUNCHER:
addTime = 800;
break;
case WP_ROCKET_LAUNCHER:
addTime = 800;
break;
case WP_PLASMAGUN:
addTime = 100;
break;
case WP_RAILGUN:
addTime = 1500;
break;
case WP_BFG:
addTime = 200;
break;

Changing any of these values will change the rate of fire for that weapon, so try changing this for a super faster rapid fire railgun!:

case WP_RAILGUN:
addTime = 100;
break;

Comments »



  Page 1

  Comments ( 0 )


  Features Index

  Home

Copyright © 2001 MGON International AB - Privacy statement