summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-03 00:42:05 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-03 00:42:05 +0200
commitff4af35292e82e03c7160a3c85e2296655057deb (patch)
tree16071dbd0f80872709b7699c5b789e0ac2ca827d /src
parentFix CMessages::InsertStringInString (diff)
downloadre3-ff4af35292e82e03c7160a3c85e2296655057deb.tar
re3-ff4af35292e82e03c7160a3c85e2296655057deb.tar.gz
re3-ff4af35292e82e03c7160a3c85e2296655057deb.tar.bz2
re3-ff4af35292e82e03c7160a3c85e2296655057deb.tar.lz
re3-ff4af35292e82e03c7160a3c85e2296655057deb.tar.xz
re3-ff4af35292e82e03c7160a3c85e2296655057deb.tar.zst
re3-ff4af35292e82e03c7160a3c85e2296655057deb.zip
Diffstat (limited to '')
-rw-r--r--src/core/Pad.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index e6e43632..c4c4a69e 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -1016,7 +1016,7 @@ void CPad::AffectFromXinput(uint32 pad)
if (Abs(rx) > 0.3f || Abs(ry) > 0.3f) {
PCTempJoyState.RightStickX = (int32)(rx * 128.0f);
- PCTempJoyState.RightStickY = (int32)(ry * 128.0f);
+ PCTempJoyState.RightStickY = (int32)(-ry * 128.0f);
}
XINPUT_VIBRATION VibrationState;
@@ -2223,6 +2223,9 @@ int16 CPad::SniperModeLookLeftRight(void)
int16 CPad::SniperModeLookUpDown(void)
{
int16 axis = NewState.LeftStickY;
+#ifdef FIX_BUGS
+ axis = -axis;
+#endif
int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
if ( Abs(axis) > Abs(dpad) )
@@ -2249,7 +2252,11 @@ int16 CPad::LookAroundLeftRight(void)
int16 CPad::LookAroundUpDown(void)
{
int16 axis = GetPad(0)->NewState.RightStickY;
-
+
+#ifdef FIX_BUGS
+ axis = -axis;
+#endif
+
if ( Abs(axis) > 85 && !GetLookBehindForPed() )
return (int16) ( (axis + ( ( axis > 0 ) ? -85 : 85) )
* (127.0f / 32.0f) ); // 3.96875f