summaryrefslogtreecommitdiff
path: root/src/cgame/cg_view.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2001-02-05 03:14:44 +0000
committerTim Angus <tim@ngus.net>2001-02-05 03:14:44 +0000
commit96d1e6700762377bbfe54f30422ee0f532bea275 (patch)
treec4e311216bb70d2ad4a3f818250d97f62a3c3989 /src/cgame/cg_view.c
parent76c534a0ef5d3d7ce318757d4be4675a9c63e8ae (diff)
Significantly reogranised how class properties are propogated between client/server. Started on Droid infest mechanism.
Diffstat (limited to 'src/cgame/cg_view.c')
-rw-r--r--src/cgame/cg_view.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c
index 7dabda68..d8401334 100644
--- a/src/cgame/cg_view.c
+++ b/src/cgame/cg_view.c
@@ -307,7 +307,7 @@ static void CG_StepOffset( void ) {
int timeDelta;
int steptime;
- BG_unpackAttributes( NULL, NULL, &steptime, cg.predictedPlayerState.stats );
+ steptime = BG_FindSteptimeForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] );
// smooth out stair climbing
timeDelta = cg.time - cg.stepTime;
@@ -331,9 +331,9 @@ static void CG_OffsetFirstPersonView( void ) {
float delta;
float speed;
float f;
- vec3_t predictedVelocity;
+ vec3_t predictedVelocity;
int timeDelta;
- int bob2;
+ float bob2;
if ( cg.snap->ps.pm_type == PM_INTERMISSION ) {
return;
@@ -389,17 +389,17 @@ static void CG_OffsetFirstPersonView( void ) {
// add angles based on bob
//TA: bob amount is class dependant
- BG_unpackAttributes( NULL, &bob2, NULL, cg.predictedPlayerState.stats );
+ bob2 = BG_FindBobForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] );
if( bob2 != 0 )
{
// make sure the bob is visible even at low speeds
speed = cg.xyspeed > 200 ? cg.xyspeed : 200;
- delta = cg.bobfracsin * ( bob2 / 1000.0 ) * speed;
+ delta = cg.bobfracsin * ( bob2 ) * speed;
if (cg.predictedPlayerState.pm_flags & PMF_DUCKED)
delta *= 3; // crouching
angles[PITCH] += delta;
- delta = cg.bobfracsin * ( bob2 / 1000.0 ) * speed;
+ delta = cg.bobfracsin * ( bob2 ) * speed;
if (cg.predictedPlayerState.pm_flags & PMF_DUCKED)
delta *= 3; // crouching accentuates roll
if (cg.bobcycle & 1)
@@ -530,7 +530,7 @@ static int CG_CalcFov( void ) {
int a;
float b;
- BG_unpackAttributes( &attribFov, NULL, NULL, cg.predictedPlayerState.stats );
+ attribFov = BG_FindFovForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] );
if ( cg.predictedPlayerState.pm_type == PM_INTERMISSION ) {
// if in intermission, use a fixed value
@@ -555,7 +555,7 @@ static int CG_CalcFov( void ) {
zoomFov = attribFov;
//TA: only do all the zoom stuff if the client CAN zoom
- if( cg.predictedPlayerState.stats[ STAT_ABILITIES ] & SCA_CANZOOM )
+ if( BG_ClassHasAbility( cg.predictedPlayerState.stats[ STAT_PCLASS ], SCA_CANZOOM ) )
{
if ( cg.zoomed )
{