mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 18:00:00 +00:00
Fix pad Y axis
This commit is contained in:
parent
dcd1ba6578
commit
ff4af35292
|
@ -1016,7 +1016,7 @@ void CPad::AffectFromXinput(uint32 pad)
|
||||||
|
|
||||||
if (Abs(rx) > 0.3f || Abs(ry) > 0.3f) {
|
if (Abs(rx) > 0.3f || Abs(ry) > 0.3f) {
|
||||||
PCTempJoyState.RightStickX = (int32)(rx * 128.0f);
|
PCTempJoyState.RightStickX = (int32)(rx * 128.0f);
|
||||||
PCTempJoyState.RightStickY = (int32)(ry * 128.0f);
|
PCTempJoyState.RightStickY = (int32)(-ry * 128.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
XINPUT_VIBRATION VibrationState;
|
XINPUT_VIBRATION VibrationState;
|
||||||
|
@ -2223,6 +2223,9 @@ int16 CPad::SniperModeLookLeftRight(void)
|
||||||
int16 CPad::SniperModeLookUpDown(void)
|
int16 CPad::SniperModeLookUpDown(void)
|
||||||
{
|
{
|
||||||
int16 axis = NewState.LeftStickY;
|
int16 axis = NewState.LeftStickY;
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
axis = -axis;
|
||||||
|
#endif
|
||||||
int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
|
int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
|
||||||
|
|
||||||
if ( Abs(axis) > Abs(dpad) )
|
if ( Abs(axis) > Abs(dpad) )
|
||||||
|
@ -2250,6 +2253,10 @@ int16 CPad::LookAroundUpDown(void)
|
||||||
{
|
{
|
||||||
int16 axis = GetPad(0)->NewState.RightStickY;
|
int16 axis = GetPad(0)->NewState.RightStickY;
|
||||||
|
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
axis = -axis;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( Abs(axis) > 85 && !GetLookBehindForPed() )
|
if ( Abs(axis) > 85 && !GetLookBehindForPed() )
|
||||||
return (int16) ( (axis + ( ( axis > 0 ) ? -85 : 85) )
|
return (int16) ( (axis + ( ( axis > 0 ) ? -85 : 85) )
|
||||||
* (127.0f / 32.0f) ); // 3.96875f
|
* (127.0f / 32.0f) ); // 3.96875f
|
||||||
|
|
Loading…
Reference in a new issue