1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-06 21:26:56 +02:00

fix look in spectator mode

This commit is contained in:
XProger
2021-03-22 08:54:09 +03:00
parent 0724a5bd71
commit 734f6255c0

View File

@@ -442,6 +442,7 @@ struct Camera : ICamera {
if (lookAngle.y < EPS) lookAngle.y = 0.0f;
}
if (!spectator) {
vec2 R = Input::joy[Core::settings.controls[cameraIndex].joyIndex].R;
R.x = sign(R.x) * max(0.0f, (fabsf(R.x) - INPUT_JOY_DZ_STICK) / (1.0f - INPUT_JOY_DZ_STICK));
R.y = sign(R.y) * max(0.0f, (fabsf(R.y) - INPUT_JOY_DZ_STICK) / (1.0f - INPUT_JOY_DZ_STICK));
@@ -451,6 +452,7 @@ struct Camera : ICamera {
viewAngle.z = 0.0f;
}
}
}
targetAngle = owner->angle + lookAngle + viewAngle;