summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2014-07-13 18:56:55 +0200
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:12 +0100
commitc63bbf8000e75e5a3247f700bdf69a542e33d5ac (patch)
treeb4043b188a5ae500185c84ab7402bb665e3132b3
parentd300623e4c1f091db51e78dfee4cdf5611d3754c (diff)
class-specific landing bobbing amounts
-rw-r--r--src/cgame/cg_event.c8
-rw-r--r--src/game/bg_misc.c13
-rw-r--r--src/game/bg_public.h1
3 files changed, 18 insertions, 4 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index 0b102647..2401d04e 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -561,7 +561,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
if( clientNum == cg.predictedPlayerState.clientNum )
{
// smooth landing z changes
- cg.landChange = -8;
+ cg.landChange = -1 * BG_Class( cg.predictedPlayerState.stats[ STAT_CLASS ] )->landBob;
cg.landTime = cg.time;
}
break;
@@ -573,19 +573,19 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
if( clientNum == cg.predictedPlayerState.clientNum )
{
// smooth landing z changes
- cg.landChange = -16;
+ cg.landChange = -2 * BG_Class( cg.predictedPlayerState.stats[ STAT_CLASS ] )->landBob;
cg.landTime = cg.time;
}
break;
case EV_FALL_FAR:
- trap_S_StartSound (NULL, es->number, CHAN_AUTO, CG_CustomSound( es->number, "*fall1.wav" ) );
+ trap_S_StartSound( NULL, es->number, CHAN_AUTO, CG_CustomSound( es->number, "*fall1.wav" ) );
cent->pe.painTime = cg.time; // don't play a pain sound right after this
if( clientNum == cg.predictedPlayerState.clientNum )
{
// smooth landing z changes
- cg.landChange = -24;
+ cg.landChange = -3 * BG_Class( cg.predictedPlayerState.stats[ STAT_CLASS ] )->landBob;
cg.landTime = cg.time;
}
break;
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 32b821ea..deabc983 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -864,6 +864,7 @@ static const classAttributes_t bg_classList[ ] =
90, //int fov;
0.000f, //float bob;
1.0f, //float bobCycle;
+ 0.0f, //float landBob;
0, //int steptime;
600, //float speed;
10.0f, //float acceleration;
@@ -891,6 +892,7 @@ static const classAttributes_t bg_classList[ ] =
110, //int fov;
0.001f, //float bob;
2.0f, //float bobCycle;
+ 4.5f, //float landBob;
150, //int steptime;
ABUILDER_SPEED, //float speed;
10.0f, //float acceleration;
@@ -919,6 +921,7 @@ static const classAttributes_t bg_classList[ ] =
110, //int fov;
0.001f, //float bob;
2.0f, //float bobCycle;
+ 4.5f, //float landBob;
100, //int steptime;
ABUILDER_UPG_SPEED, //float speed;
10.0f, //float acceleration;
@@ -946,6 +949,7 @@ static const classAttributes_t bg_classList[ ] =
140, //int fov;
0.0f, //float bob;
2.5f, //float bobCycle;
+ 0.0f, //float landBob;
25, //int steptime;
LEVEL0_SPEED, //float speed;
10.0f, //float acceleration;
@@ -975,6 +979,7 @@ static const classAttributes_t bg_classList[ ] =
120, //int fov;
0.001f, //float bob;
1.8f, //float bobCycle;
+ 0.0f, //float landBob;
60, //int steptime;
LEVEL1_SPEED, //float speed;
10.0f, //float acceleration;
@@ -1004,6 +1009,7 @@ static const classAttributes_t bg_classList[ ] =
120, //int fov;
0.001f, //float bob;
1.8f, //float bobCycle;
+ 0.0f, //float landBob;
60, //int steptime;
LEVEL1_UPG_SPEED, //float speed;
10.0f, //float acceleration;
@@ -1031,6 +1037,7 @@ static const classAttributes_t bg_classList[ ] =
90, //int fov;
0.001f, //float bob;
1.5f, //float bobCycle;
+ 0.0f, //float landBob;
80, //int steptime;
LEVEL2_SPEED, //float speed;
10.0f, //float acceleration;
@@ -1058,6 +1065,7 @@ static const classAttributes_t bg_classList[ ] =
90, //int fov;
0.001f, //float bob;
1.5f, //float bobCycle;
+ 0.0f, //float landBob;
80, //int steptime;
LEVEL2_UPG_SPEED, //float speed;
10.0f, //float acceleration;
@@ -1086,6 +1094,7 @@ static const classAttributes_t bg_classList[ ] =
110, //int fov;
0.0005f, //float bob;
1.3f, //float bobCycle;
+ 0.0f, //float landBob;
90, //int steptime;
LEVEL3_SPEED, //float speed;
10.0f, //float acceleration;
@@ -1114,6 +1123,7 @@ static const classAttributes_t bg_classList[ ] =
110, //int fov;
0.0005f, //float bob;
1.3f, //float bobCycle;
+ 0.0f, //float landBob;
90, //int steptime;
LEVEL3_UPG_SPEED, //float speed;
10.0f, //float acceleration;
@@ -1143,6 +1153,7 @@ static const classAttributes_t bg_classList[ ] =
90, //int fov;
0.001f, //float bob;
1.1f, //float bobCycle;
+ 0.0f, //float landBob;
100, //int steptime;
LEVEL4_SPEED, //float speed;
10.0f, //float acceleration;
@@ -1169,6 +1180,7 @@ static const classAttributes_t bg_classList[ ] =
90, //int fov;
0.002f, //float bob;
1.0f, //float bobCycle;
+ 8.0f, //float landBob;
100, //int steptime;
1.0f, //float speed;
10.0f, //float acceleration;
@@ -1195,6 +1207,7 @@ static const classAttributes_t bg_classList[ ] =
90, //int fov;
0.002f, //float bob;
1.0f, //float bobCycle;
+ 5.0f, //float landBob;
100, //int steptime;
1.0f, //float speed;
10.0f, //float acceleration;
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 39dd1d80..77aed5fe 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -934,6 +934,7 @@ typedef struct
int fov;
float bob;
float bobCycle;
+ float landBob;
int steptime;
float speed;