summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_local.h1
-rw-r--r--src/cgame/cg_main.c4
-rw-r--r--src/cgame/cg_view.c3
3 files changed, 7 insertions, 1 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 97a21d9..7d4bd3d 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -1592,6 +1592,7 @@ extern vmCvar_t cg_BubbleZoom;
extern vmCvar_t cg_viewQuake;
extern vmCvar_t cg_viewQuakeLambda;
+extern vmCvar_t cg_viewQuakeLimit;
//
// cg_main.c
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index c5ad444..366a6a3 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -230,6 +230,7 @@ vmCvar_t cg_EDGEFPSFIX;
vmCvar_t cg_viewQuake;
vmCvar_t cg_viewQuakeLambda;
+vmCvar_t cg_viewQuakeLimit;
typedef struct
{
@@ -377,7 +378,8 @@ static cvarTable_t cvarTable[ ] =
{ &cg_EDGEFPSFIX, "cg_EDGEFPSFIX", "0", CVAR_ARCHIVE|CVAR_USERINFO },
{ &cg_viewQuake, "cg_viewQuake", "1", CVAR_ARCHIVE },
- { &cg_viewQuakeLambda, "cg_viewQuakeLambda", "-10", CVAR_ARCHIVE }
+ { &cg_viewQuakeLambda, "cg_viewQuakeLambda", "-10", CVAR_ARCHIVE },
+ { &cg_viewQuakeLimit, "cg_viewQuakeLimit", "5", CVAR_ARCHIVE }
};
static int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] );
diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c
index 68f9287..eb6e88d 100644
--- a/src/cgame/cg_view.c
+++ b/src/cgame/cg_view.c
@@ -556,6 +556,9 @@ void CG_InduceViewQuake( vec3_t src, float mag )
dist = Distance( src, cg.refdef.vieworg );
cg.viewQuake += mag / dist / dist * 1000.0f;
}
+
+ if( cg.viewQuake > cg_viewQuakeLimit.value )
+ cg.viewQuake = cg_viewQuakeLimit.value;
}
/*