summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/bg_pmove.c7
-rw-r--r--src/game/tremulous.h1
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