Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Reverted Pad.cpp to previous state.
  • Loading branch information
gennariarmando committed Jun 27, 2019
1 parent 69ac8bc commit 1ac41734465d28bdb2b641bc1b039e27c9b56786
Showing with 14 additions and 10 deletions.
  1. +14 −10 src/Pad.cpp
@@ -1674,26 +1674,30 @@ int16 CPad::SniperModeLookUpDown(void)


int16 CPad::LookAroundLeftRight(void) int16 CPad::LookAroundLeftRight(void)
{ {
int16 axis = NewState.RightStickX; float axis = GetPad(0)->NewState.RightStickX;


if ( fabs(axis) > 65 && !GetLookBehindForPed() ) if ( fabs(axis) > 85 && !GetLookBehindForPed() )
return ((axis > 0 ? axis - 65 : axis + 65) * ((255 - 65) / (127 - 32))); return (int16) ( (axis + ( axis > 0 ) ? -85 : 85)
* (127.0f / 32.0f) ); // 3.96875f


else if (TheCamera.Cams[0].Using3rdPersonMouseCam() && fabs(axis) > 10) else if ( TheCamera.Cams[0].Using3rdPersonMouseCam() && fabs(axis) > 10 )
return (axis); return (int16) ( (axis + ( axis > 0 ) ? -10 : 10)
* (127.0f / 64.0f) ); // 1.984375f


return 0; return 0;
} }


int16 CPad::LookAroundUpDown(void) int16 CPad::LookAroundUpDown(void)
{ {
int16 axis = NewState.RightStickY; int16 axis = GetPad(0)->NewState.RightStickY;


if (fabs(axis) > 65 && !GetLookBehindForPed()) if ( abs(axis) > 85 && !GetLookBehindForPed() )
return ((axis > 0 ? axis - 65 : axis + 65) * ((255 - 65) / (127 - 32))); return (int16) ( (axis + ( axis > 0 ) ? -85 : 85)
* (127.0f / 32.0f) ); // 3.96875f


else if (TheCamera.Cams[0].Using3rdPersonMouseCam() && fabs(axis) > 10) else if ( TheCamera.Cams[0].Using3rdPersonMouseCam() && abs(axis) > 40 )
return (axis); return (int16) ( (axis + ( axis > 0 ) ? -40 : 40)
* (127.0f / 64.0f) ); // 1.984375f


return 0; return 0;
} }

0 comments on commit 1ac4173

Please sign in to comment.