This is a fork of Zandronum Beta for TSPG.
Révision | 030ef0c65694408692fe128064b801fdda3443dd (tree) |
---|---|
l'heure | 2021-11-20 23:54:51 |
Auteur | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Added "cl_useskulltagmouse" which restores the old mouse movement from Zandronum 3.0 and earlier.
@@ -169,6 +169,9 @@ | ||
169 | 169 | // [JS] Always makes us ready when we are in intermission. |
170 | 170 | CVAR( Bool, cl_autoready, false, CVAR_ARCHIVE ) |
171 | 171 | |
172 | +// [AK] Restores the old mouse behaviour from Skulltag. | |
173 | +CVAR( Bool, cl_useskulltagmouse, false, CVAR_GLOBALCONFIG | CVAR_ARCHIVE ) | |
174 | + | |
172 | 175 | // [AK] Let the user send backup copies of old commands, in case of packet loss. |
173 | 176 | CUSTOM_CVAR( Int, cl_backupcommands, 0, CVAR_ARCHIVE ) |
174 | 177 | { |
@@ -214,6 +214,7 @@ | ||
214 | 214 | EXTERN_CVAR( String, cl_password ) |
215 | 215 | EXTERN_CVAR( String, cl_joinpassword ) |
216 | 216 | EXTERN_CVAR( Bool, cl_hitscandecalhack ) |
217 | +EXTERN_CVAR( Bool, cl_useskulltagmouse ) // [AK] | |
217 | 218 | EXTERN_CVAR( Int, cl_backupcommands ) // [AK] |
218 | 219 | |
219 | 220 | // Not in cl_main.cpp, but this seems like a good enough place for it. |
@@ -350,12 +350,14 @@ | ||
350 | 350 | int look = int(ev->y * m_pitch * mouse_sensitivity * 16.0); |
351 | 351 | if (invertmouse) |
352 | 352 | look = -look; |
353 | - G_AddViewPitch (look, true); | |
353 | + // [AK] Force interpolation if we're using the old Skulltag mouse movement. | |
354 | + G_AddViewPitch (look, !cl_useskulltagmouse); | |
354 | 355 | events[eventhead].y = 0; |
355 | 356 | } |
356 | 357 | if (!Button_Strafe.bDown && !lookstrafe) |
357 | 358 | { |
358 | - G_AddViewAngle (int(ev->x * m_yaw * mouse_sensitivity * 8.0), true); | |
359 | + // [AK] Force interpolation if we're using the old Skulltag mouse movement. | |
360 | + G_AddViewAngle (int(ev->x * m_yaw * mouse_sensitivity * 8.0), !cl_useskulltagmouse); | |
359 | 361 | events[eventhead].x = 0; |
360 | 362 | } |
361 | 363 | if ((events[eventhead].x | events[eventhead].y) == 0) |
@@ -1331,7 +1333,11 @@ | ||
1331 | 1333 | S_UpdateSounds( players[consoleplayer].camera ); |
1332 | 1334 | |
1333 | 1335 | // Update display, next frame, with current state. |
1334 | - I_StartTic( ); | |
1336 | + // [AK] Don't call I_StartTic() if we're currently using the old | |
1337 | + // Skulltag mouse behaviour. | |
1338 | + if ( cl_useskulltagmouse == false ) | |
1339 | + I_StartTic( ); | |
1340 | + | |
1335 | 1341 | D_Display( ); |
1336 | 1342 | break; |
1337 | 1343 | case NETSTATE_SERVER: |
@@ -576,6 +576,7 @@ | ||
576 | 576 | Slider "Overall sensitivity", "mouse_sensitivity", 0.5, 2.5, 0.1 |
577 | 577 | Option "Prescale mouse movement", "m_noprescale", "NoYes" |
578 | 578 | Option "Smooth mouse movement", "smooth_mouse", "YesNo" |
579 | + Option "Use old Skulltag mouse", "cl_useskulltagmouse", "YesNo" // [AK] | |
579 | 580 | StaticText "" |
580 | 581 | Slider "Turning speed", "m_yaw", 0, 2.5, 0.1 |
581 | 582 | Slider "Mouselook speed", "m_pitch", 0, 2.5, 0.1 |