Increased Knockback Feature Type: Coding Tutorials     Added: 21/01  
  Author: Corven 

Just a small change can give you some serious kickback from weapons and explosions.

Code to be Added or Changed


Look for the G_Damage function, and fin these lines:

knockback = damage;

if ( knockback > 200 ) {
knockback = 200;

Increasing this upper limit will let the player take more knockback. Now you can just change the value of knockback, the higher the value the further the knockback, but even changing it to 300 will send you flying a good distance, so don't over do it.

if ( knockback > 300 ) {
knockback = 300;

Alternatively you could add some code to give you more knockback from splash damage only, like this, giving you double the knockback:

//CORVEN splash damage knockback
if ( dflags & DAMAGE_RADIUS ) {
knockback *= 2;

Comments »

  Page 1

  Comments ( 0 )

  Features Index


Copyright 2001 MGON International AB - Privacy statement