summaryrefslogtreecommitdiff
path: root/src/client/cl_main.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-11-16 00:23:28 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:20 +0000
commit21674b587ca1aa1e956b66ae6e613d5afb2111d3 (patch)
treeef74238d6371114ac0f773eacd209f728225ffb9 /src/client/cl_main.c
parentd22e46c9afdaf65a06ed0836d4f7e2b9e689e4d9 (diff)
* Merge ioq3-r1752
Diffstat (limited to 'src/client/cl_main.c')
-rw-r--r--src/client/cl_main.c43
1 files changed, 35 insertions, 8 deletions
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index 4c8ded12..ff86ee2f 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -74,6 +74,8 @@ cvar_t *cl_freelook;
cvar_t *cl_sensitivity;
cvar_t *cl_mouseAccel;
+cvar_t *cl_mouseAccelOffset;
+cvar_t *cl_mouseAccelStyle;
cvar_t *cl_showMouseRate;
cvar_t *m_pitch;
@@ -977,7 +979,7 @@ void CL_PlayDemo_f( void ) {
char retry[MAX_OSPATH];
if (Cmd_Argc() != 2) {
- Com_Printf ("playdemo <demoname>\n");
+ Com_Printf ("demo <demoname>\n");
return;
}
@@ -985,14 +987,17 @@ void CL_PlayDemo_f( void ) {
// 2 means don't force disconnect of local client
Cvar_Set( "sv_killserver", "2" );
- CL_Disconnect( qtrue );
-
// open the demo file
arg = Cmd_Argv(1);
+ CL_Disconnect( qtrue );
+
// check for an extension .dm_?? (?? is protocol)
ext_test = arg + strlen(arg) - 6;
- if ((strlen(arg) > 6) && (ext_test[0] == '.') && ((ext_test[1] == 'd') || (ext_test[1] == 'D')) && ((ext_test[2] == 'm') || (ext_test[2] == 'M')) && (ext_test[3] == '_'))
+ if ((strlen(arg) > 6) && (ext_test[0] == '.') &&
+ ((ext_test[1] == 'd') || (ext_test[1] == 'D')) &&
+ ((ext_test[2] == 'm') || (ext_test[2] == 'M')) &&
+ (ext_test[3] == '_'))
{
protocol = atoi(ext_test+4);
i=0;
@@ -1343,6 +1348,9 @@ void CL_Disconnect( qboolean showMainMenu ) {
CL_WritePacket();
}
+ // Remove pure paks
+ FS_PureServerSetLoadedPaks("", "");
+
CL_ClearState ();
// wipe the client connection
@@ -1752,17 +1760,29 @@ void CL_Vid_Restart_f( void ) {
/*
=================
-CL_Snd_Restart_f
+CL_Snd_Restart
Restart the sound subsystem
-The cgame and game must also be forced to restart because
-handles will be invalid
=================
*/
-void CL_Snd_Restart_f( void ) {
+void CL_Snd_Restart(void)
+{
S_Shutdown();
S_Init();
+}
+/*
+=================
+CL_Snd_Restart_f
+
+Restart the sound subsystem
+The cgame and game must also be forced to restart because
+handles will be invalid
+=================
+*/
+void CL_Snd_Restart_f(void)
+{
+ CL_Snd_Restart();
CL_Vid_Restart_f();
}
@@ -3337,6 +3357,13 @@ void CL_Init( void ) {
cl_mouseAccel = Cvar_Get ("cl_mouseAccel", "0", CVAR_ARCHIVE);
cl_freelook = Cvar_Get( "cl_freelook", "1", CVAR_ARCHIVE );
+ // 0: legacy mouse acceleration
+ // 1: new implementation
+ cl_mouseAccelStyle = Cvar_Get( "cl_mouseAccelStyle", "0", CVAR_ARCHIVE );
+ // offset for the power function (for style 1, ignored otherwise)
+ // this should be set to the max rate value
+ cl_mouseAccelOffset = Cvar_Get( "cl_mouseAccelOffset", "5", CVAR_ARCHIVE );
+
cl_showMouseRate = Cvar_Get ("cl_showmouserate", "0", 0);
cl_allowDownload = Cvar_Get ("cl_allowDownload", "0", CVAR_ARCHIVE);