# HG changeset patch # User Adam Kaminski # Date 1637420091 18000 # Sat Nov 20 09:54:51 2021 -0500 # Node ID cdd9c097d45292824595223c5a6203c736df3013 # Parent 4500bb1ce4f2a2210582a47338b3c51e13063462 Added "cl_useskulltagmouse" which restores the old mouse movement from Zandronum 3.0 and earlier. diff -r 4500bb1ce4f2 -r cdd9c097d452 src/cl_main.cpp --- a/src/cl_main.cpp Thu Nov 18 19:43:09 2021 -0500 +++ b/src/cl_main.cpp Sat Nov 20 09:54:51 2021 -0500 @@ -169,6 +169,9 @@ // [JS] Always makes us ready when we are in intermission. CVAR( Bool, cl_autoready, false, CVAR_ARCHIVE ) +// [AK] Restores the old mouse behaviour from Skulltag. +CVAR( Bool, cl_useskulltagmouse, false, CVAR_GLOBALCONFIG | CVAR_ARCHIVE ) + // [AK] Let the user send backup copies of old commands, in case of packet loss. CUSTOM_CVAR( Int, cl_backupcommands, 0, CVAR_ARCHIVE ) { diff -r 4500bb1ce4f2 -r cdd9c097d452 src/cl_main.h --- a/src/cl_main.h Thu Nov 18 19:43:09 2021 -0500 +++ b/src/cl_main.h Sat Nov 20 09:54:51 2021 -0500 @@ -214,6 +214,7 @@ EXTERN_CVAR( String, cl_password ) EXTERN_CVAR( String, cl_joinpassword ) EXTERN_CVAR( Bool, cl_hitscandecalhack ) +EXTERN_CVAR( Bool, cl_useskulltagmouse ) // [AK] EXTERN_CVAR( Int, cl_backupcommands ) // [AK] // Not in cl_main.cpp, but this seems like a good enough place for it. diff -r 4500bb1ce4f2 -r cdd9c097d452 src/d_main.cpp --- a/src/d_main.cpp Thu Nov 18 19:43:09 2021 -0500 +++ b/src/d_main.cpp Sat Nov 20 09:54:51 2021 -0500 @@ -350,12 +350,14 @@ int look = int(ev->y * m_pitch * mouse_sensitivity * 16.0); if (invertmouse) look = -look; - G_AddViewPitch (look, true); + // [AK] Force interpolation if we're using the old Skulltag mouse movement. + G_AddViewPitch (look, !cl_useskulltagmouse); events[eventhead].y = 0; } if (!Button_Strafe.bDown && !lookstrafe) { - G_AddViewAngle (int(ev->x * m_yaw * mouse_sensitivity * 8.0), true); + // [AK] Force interpolation if we're using the old Skulltag mouse movement. + G_AddViewAngle (int(ev->x * m_yaw * mouse_sensitivity * 8.0), !cl_useskulltagmouse); events[eventhead].x = 0; } if ((events[eventhead].x | events[eventhead].y) == 0) @@ -1331,7 +1333,11 @@ S_UpdateSounds( players[consoleplayer].camera ); // Update display, next frame, with current state. - I_StartTic( ); + // [AK] Don't call I_StartTic() if we're currently using the old + // Skulltag mouse behaviour. + if ( cl_useskulltagmouse == false ) + I_StartTic( ); + D_Display( ); break; case NETSTATE_SERVER: diff -r 4500bb1ce4f2 -r cdd9c097d452 wadsrc/static/menudef.txt --- a/wadsrc/static/menudef.txt Thu Nov 18 19:43:09 2021 -0500 +++ b/wadsrc/static/menudef.txt Sat Nov 20 09:54:51 2021 -0500 @@ -576,6 +576,7 @@ Slider "Overall sensitivity", "mouse_sensitivity", 0.5, 2.5, 0.1 Option "Prescale mouse movement", "m_noprescale", "NoYes" Option "Smooth mouse movement", "smooth_mouse", "YesNo" + Option "Use old Skulltag mouse", "cl_useskulltagmouse", "YesNo" // [AK] StaticText "" Slider "Turning speed", "m_yaw", 0, 2.5, 0.1 Slider "Mouselook speed", "m_pitch", 0, 2.5, 0.1