mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
Vertical camera angle wrapping fix
Solves a issue when using Input Remapper's Mouse-based Reset to Horizon camera function (e.g. Steam Input), where the recenter couldn't stay centered.
This commit is contained in:
1 parent
246d737663
commit
f251653317
1 file changed
-8
@@ -2415,14 +2415,6 @@ void bmoveTick(bool allowc1x, bool allowc1y, bool allowc1buttons, bool ignorec2)
|
||||
|
||||
void bmoveUpdateVerta(void)
|
||||
{
|
||||
while (g_Vars.currentplayer->vv_verta < -180) {
|
||||
g_Vars.currentplayer->vv_verta += 360;
|
||||
}
|
||||
|
||||
while (g_Vars.currentplayer->vv_verta >= 180) {
|
||||
g_Vars.currentplayer->vv_verta -= 360;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->vv_verta > 90) {
|
||||
g_Vars.currentplayer->vv_verta = 90;
|
||||
} else if (g_Vars.currentplayer->vv_verta < -90) {
|
||||
|
||||
Reference in new issue
Block a user