• R/O
  • SSH

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum Beta for TSPG.


Commit MetaInfo

Révision030ef0c65694408692fe128064b801fdda3443dd (tree)
l'heure2021-11-20 23:54:51
AuteurAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Message de Log

Added "cl_useskulltagmouse" which restores the old mouse movement from Zandronum 3.0 and earlier.

Change Summary

Modification

diff -r ca984c417a9c -r 030ef0c65694 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 @@
169169 // [JS] Always makes us ready when we are in intermission.
170170 CVAR( Bool, cl_autoready, false, CVAR_ARCHIVE )
171171
172+// [AK] Restores the old mouse behaviour from Skulltag.
173+CVAR( Bool, cl_useskulltagmouse, false, CVAR_GLOBALCONFIG | CVAR_ARCHIVE )
174+
172175 // [AK] Let the user send backup copies of old commands, in case of packet loss.
173176 CUSTOM_CVAR( Int, cl_backupcommands, 0, CVAR_ARCHIVE )
174177 {
diff -r ca984c417a9c -r 030ef0c65694 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 @@
214214 EXTERN_CVAR( String, cl_password )
215215 EXTERN_CVAR( String, cl_joinpassword )
216216 EXTERN_CVAR( Bool, cl_hitscandecalhack )
217+EXTERN_CVAR( Bool, cl_useskulltagmouse ) // [AK]
217218 EXTERN_CVAR( Int, cl_backupcommands ) // [AK]
218219
219220 // Not in cl_main.cpp, but this seems like a good enough place for it.
diff -r ca984c417a9c -r 030ef0c65694 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 @@
350350 int look = int(ev->y * m_pitch * mouse_sensitivity * 16.0);
351351 if (invertmouse)
352352 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);
354355 events[eventhead].y = 0;
355356 }
356357 if (!Button_Strafe.bDown && !lookstrafe)
357358 {
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);
359361 events[eventhead].x = 0;
360362 }
361363 if ((events[eventhead].x | events[eventhead].y) == 0)
@@ -1331,7 +1333,11 @@
13311333 S_UpdateSounds( players[consoleplayer].camera );
13321334
13331335 // 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+
13351341 D_Display( );
13361342 break;
13371343 case NETSTATE_SERVER:
diff -r ca984c417a9c -r 030ef0c65694 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 @@
576576 Slider "Overall sensitivity", "mouse_sensitivity", 0.5, 2.5, 0.1
577577 Option "Prescale mouse movement", "m_noprescale", "NoYes"
578578 Option "Smooth mouse movement", "smooth_mouse", "YesNo"
579+ Option "Use old Skulltag mouse", "cl_useskulltagmouse", "YesNo" // [AK]
579580 StaticText ""
580581 Slider "Turning speed", "m_yaw", 0, 2.5, 0.1
581582 Slider "Mouselook speed", "m_pitch", 0, 2.5, 0.1