diff options
author | Roman Tetelman <kevlarman@gmail.com> | 2009-10-03 11:53:33 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:29 +0000 |
commit | 3cdc6d312f559318dee729d4ee827b8e02d1a4b9 (patch) | |
tree | 074cc2c20269cc6b19a40025179d1acdad07ee02 | |
parent | 29a8cd9836dd913ca71b696b9ae4fb58f7717052 (diff) |
* trample stops after LEVEL4_TRAMPLE_DURATION - LEVEL4_TRAMPLE_CHARGE_MIN because it's not particularly useful after that point
-rw-r--r-- | src/game/bg_pmove.c | 7 | ||||
-rw-r--r-- | src/game/tremulous.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 278aab21..a70ef001 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2905,8 +2905,11 @@ static void PM_Weapon( void ) // Discharging else { - pm->ps->stats[ STAT_MISC ] -= pml.msec; - + if( pm->ps->stats[ STAT_MISC ] < LEVEL4_TRAMPLE_CHARGE_MIN ) + pm->ps->stats[ STAT_MISC ] = 0; + else + pm->ps->stats[ STAT_MISC ] -= pml.msec; + // If the charger has stopped moving take a chunk of charge away if( VectorLength( pm->ps->velocity ) < 64.0f || pm->cmd.rightmove ) pm->ps->stats[ STAT_MISC ] -= LEVEL4_TRAMPLE_STOP_PENALTY * pml.msec; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index b3ed8633..97a2dc0a 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -122,6 +122,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define LEVEL4_TRAMPLE_CHARGE_MAX 1000 // msec to maximum charge stored #define LEVEL4_TRAMPLE_CHARGE_TRIGGER 3000 // msec charge starts on its own #define LEVEL4_TRAMPLE_DURATION 3000 // msec trample lasts on full charge +#define LEVEL4_TRAMPLE_STOP_PERCENTAGE 20 // removed from the end of trample when it isn't very useful #define LEVEL4_TRAMPLE_STOP_PENALTY 1 // charge lost per msec when stopped #define LEVEL4_TRAMPLE_REPEAT 50 // msec before a trample will rehit a player |