summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_local.h3
-rw-r--r--src/cgame/cg_main.c6
-rw-r--r--src/cgame/cg_view.c15
3 files changed, 15 insertions, 9 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 92a2cae4..495c9089 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -1226,7 +1226,8 @@ extern vmCvar_t cg_trueLightning;
extern vmCvar_t cg_creepRes;
extern vmCvar_t cg_drawSurfNormal;
extern vmCvar_t cg_debugAlloc;
-extern vmCvar_t cg_smoothTime;
+extern vmCvar_t cg_wwSmoothTime;
+extern vmCvar_t cg_wwFollow;
//TA: hack to get class an carriage through to UI module
extern vmCvar_t ui_currentClass;
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index e3752458..392478ac 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -179,7 +179,8 @@ vmCvar_t cg_trueLightning;
vmCvar_t cg_creepRes;
vmCvar_t cg_drawSurfNormal;
vmCvar_t cg_debugAlloc;
-vmCvar_t cg_smoothTime;
+vmCvar_t cg_wwSmoothTime;
+vmCvar_t cg_wwFollow;
//TA: hack to get class an carriage through to UI module
vmCvar_t ui_currentClass;
@@ -266,7 +267,8 @@ static cvarTable_t cvarTable[] = {
{ &cg_creepRes, "cg_creepRes", "16", CVAR_ARCHIVE },
{ &cg_drawSurfNormal, "cg_drawSurfNormal", "0", CVAR_CHEAT },
{ &cg_debugAlloc, "cg_debugAlloc", "0", 0 },
- { &cg_smoothTime, "cg_smoothTime", "300", 0 },
+ { &cg_wwSmoothTime, "cg_wwSmoothTime", "300", 0 },
+ { &cg_wwFollow, "cg_wwFollow", "0", CVAR_USERINFO },
{ &ui_currentClass, "ui_currentClass", "0", 0 },
{ &ui_carriage, "ui_carriage", "", 0 },
diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c
index ed59c526..714aedbe 100644
--- a/src/cgame/cg_view.c
+++ b/src/cgame/cg_view.c
@@ -840,7 +840,7 @@ static void CG_addSmoothOp( vec3_t rotAxis, float rotAngle )
for( i = 0; i < MAXSMOOTHS; i++ )
{
//found an unused index in the smooth array
- if( cg.sList[ i ].time + cg_smoothTime.integer < cg.time )
+ if( cg.sList[ i ].time + cg_wwSmoothTime.integer < cg.time )
{
//copy to array and stop
VectorCopy( rotAxis, cg.sList[ i ].rotAxis );
@@ -914,14 +914,17 @@ static void CG_smoothWWTransitions( playerState_t *ps, const vec3_t in, vec3_t o
for( i = 0; i < MAXSMOOTHS; i++ )
{
//if this op has time remaining, perform it
- if( cg.time < cg.sList[ i ].time + cg_smoothTime.integer )
+ if( cg.time < cg.sList[ i ].time + cg_wwSmoothTime.integer )
{
- stLocal = 1.0 - ( ( ( cg.sList[ i ].time + cg_smoothTime.integer ) - cg.time ) / cg_smoothTime.integer );
+ stLocal = 1.0 - ( ( ( cg.sList[ i ].time + cg_wwSmoothTime.integer ) - cg.time ) / cg_wwSmoothTime.integer );
sFraction = -( cos( stLocal * M_PI ) + 1 ) / 2;
- RotatePointAroundVector( outAxis[ 0 ], cg.sList[ i ].rotAxis, inAxis[ 0 ], sFraction * cg.sList[ i ].rotAngle );
- RotatePointAroundVector( outAxis[ 1 ], cg.sList[ i ].rotAxis, inAxis[ 1 ], sFraction * cg.sList[ i ].rotAngle );
- RotatePointAroundVector( outAxis[ 2 ], cg.sList[ i ].rotAxis, inAxis[ 2 ], sFraction * cg.sList[ i ].rotAngle );
+ RotatePointAroundVector( outAxis[ 0 ], cg.sList[ i ].rotAxis,
+ inAxis[ 0 ], sFraction * cg.sList[ i ].rotAngle );
+ RotatePointAroundVector( outAxis[ 1 ], cg.sList[ i ].rotAxis,
+ inAxis[ 1 ], sFraction * cg.sList[ i ].rotAngle );
+ RotatePointAroundVector( outAxis[ 2 ], cg.sList[ i ].rotAxis,
+ inAxis[ 2 ], sFraction * cg.sList[ i ].rotAngle );
AxisCopy( outAxis, inAxis );
performed = qtrue;