fix: radio wheel input rework, weapon-apply guard, control-lock/close fixes (issue #31 review)
linux / build (push) Canceled after 33s
linux / build (push) Canceled after 33s
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
#include "Wanted.h"
|
||||
#include "General.h"
|
||||
|
||||
#ifdef IMPROVED_WEAPON_WHEEL
|
||||
#include "weaponwheel.h"
|
||||
#endif
|
||||
|
||||
#ifdef GTA_PS2
|
||||
#include "eetypes.h"
|
||||
#include "libpad.h"
|
||||
@@ -1532,7 +1536,14 @@ int16 CPad::GetSteeringLeftRight(void)
|
||||
case 2:
|
||||
{
|
||||
int16 axis = NewState.LeftStickX;
|
||||
#ifdef IMPROVED_WEAPON_WHEEL
|
||||
// D-pad left/right (and the arrow keys mapped to it) select radio
|
||||
// stations while the radio wheel is open; the left stick still
|
||||
// steers, so driving is not frozen.
|
||||
int16 dpad = Wheel_IsRadioWheelOpen() ? 0 : (NewState.DPadRight - NewState.DPadLeft) / 2;
|
||||
#else
|
||||
int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
|
||||
#endif
|
||||
|
||||
if ( Abs(axis) > Abs(dpad) )
|
||||
return axis;
|
||||
@@ -1652,7 +1663,14 @@ int16 CPad::GetPedWalkLeftRight(void)
|
||||
case 2:
|
||||
{
|
||||
int16 axis = NewState.LeftStickX;
|
||||
#ifdef IMPROVED_WEAPON_WHEEL
|
||||
// D-pad left/right (and the arrow keys mapped to it) select radio
|
||||
// stations while the radio wheel is open; the left stick still
|
||||
// steers, so driving is not frozen.
|
||||
int16 dpad = Wheel_IsRadioWheelOpen() ? 0 : (NewState.DPadRight - NewState.DPadLeft) / 2;
|
||||
#else
|
||||
int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
|
||||
#endif
|
||||
|
||||
if ( Abs(axis) > Abs(dpad) )
|
||||
return axis;
|
||||
|
||||
Reference in New Issue
Block a user