This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -246,8 +246,12 @@ namespace RTE {
246
246
m_MouseButtonPressedState[i] = -1 ;
247
247
m_MouseButtonReleasedState[i] = -1 ;
248
248
}
249
-
250
- msg.MouseWheelMoved = g_UInputMan.MouseWheelMoved ();
249
+ if (m_MouseWheelMoved != 0 ) {
250
+ msg.MouseWheelMoved = m_MouseWheelMoved;
251
+ m_MouseWheelMoved = 0 ;
252
+ } else {
253
+ msg.MouseWheelMoved = 0 ;
254
+ }
251
255
252
256
msg.InputElementHeld = 0 ;
253
257
msg.InputElementPressed = 0 ;
@@ -984,6 +988,10 @@ namespace RTE {
984
988
if (m_MouseButtonReleasedState[MOUSE_RIGHT] < 1 ) { m_MouseButtonReleasedState[MOUSE_RIGHT] = g_UInputMan.MouseButtonReleased (MOUSE_RIGHT, -1 ) ? 1 : 0 ; }
985
989
if (m_MouseButtonReleasedState[MOUSE_MIDDLE] < 1 ) { m_MouseButtonReleasedState[MOUSE_MIDDLE] = g_UInputMan.MouseButtonReleased (MOUSE_MIDDLE, -1 ) ? 1 : 0 ; }
986
990
991
+ if (g_UInputMan.MouseWheelMoved () != 0 ) {
992
+ m_MouseWheelMoved = g_UInputMan.MouseWheelMoved ();
993
+ }
994
+
987
995
// Input is sent at whatever settings are set in inputs per second
988
996
float inputSend = m_ClientInputFps;
989
997
Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ namespace RTE {
187
187
188
188
int m_MouseButtonPressedState[3 ]; // !<
189
189
int m_MouseButtonReleasedState[3 ]; // !<
190
+ int m_MouseWheelMoved; // !< Whether the mousewheel was moved this Update. Used to make mousewheel detection better.
190
191
191
192
private:
192
193
You can’t perform that action at this time.
0 commit comments