summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_local.h3
-rw-r--r--src/game/bg_pmove.c6
-rw-r--r--src/game/bg_public.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/game/bg_local.h b/src/game/bg_local.h
index 603d57a7..951ed385 100644
--- a/src/game/bg_local.h
+++ b/src/game/bg_local.h
@@ -25,6 +25,9 @@
#define OVERCLIP 1.001f
+#define FALLING_THRESHOLD -600.0f //what vertical speed to start falling sound at
+
+
// all of the locals will be zeroed before each
// pmove, just to make damn sure we don't have
// any differences when running on client or server
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 6781a530..79399019 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -1692,6 +1692,12 @@ static void PM_GroundTraceMissed( void )
}
}
+ if( BG_ClassHasAbility( pm->ps->stats[ STAT_PCLASS ], SCA_TAKESFALLDAMAGE ) )
+ {
+ if( pm->ps->velocity[ 2 ] < FALLING_THRESHOLD && pml.previous_velocity[ 2 ] >= FALLING_THRESHOLD )
+ PM_AddEvent( EV_FALLING );
+ }
+
pm->ps->groundEntityNum = ENTITYNUM_NONE;
pml.groundPlane = qfalse;
pml.walking = qfalse;
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 2027a339..0e256ca1 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -491,6 +491,7 @@ typedef enum
EV_FALL_SHORT,
EV_FALL_MEDIUM,
EV_FALL_FAR,
+ EV_FALLING,
EV_JUMP_PAD, // boing sound at origin, jump sound on player