Revert "Revert "Fixed multitouch device after some modifications in player controller""

This reverts commit d14916dec2.
This commit is contained in:
Deve 2018-07-18 21:32:36 +02:00
parent 1ba361ae23
commit 285b4701d6

View File

@ -340,11 +340,13 @@ void MultitouchDevice::updateAxisX(float value)
if (value < -m_deadzone_center)
{
float factor = getSteeringFactor(std::abs(value));
m_controller->action(PA_STEER_RIGHT, 0);
m_controller->action(PA_STEER_LEFT, int(factor * Input::MAX_VALUE));
}
else if (value > m_deadzone_center)
{
float factor = getSteeringFactor(std::abs(value));
m_controller->action(PA_STEER_LEFT, 0);
m_controller->action(PA_STEER_RIGHT, int(factor * Input::MAX_VALUE));
}
else