mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
port: make crosshair sway resolution independent
this might suck
This commit is contained in:
1 parent
ca8851789a
commit
8a62b884cc
1 file changed
+6
-5
+6
-5
@@ -2029,14 +2029,15 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
x = g_Vars.currentplayer->speedtheta * 0.3f + g_Vars.currentplayer->gunextraaimx;
|
||||
y = -g_Vars.currentplayer->speedverta * 0.1f + g_Vars.currentplayer->gunextraaimy;
|
||||
#else
|
||||
f32 scale;
|
||||
f32 xscale, yscale;
|
||||
if (movedata.freelookdx || movedata.freelookdy) {
|
||||
scale = g_PlayerCrosshairSway * 240.f / (f32)videoGetHeight();
|
||||
xscale = g_PlayerCrosshairSway * 0.20f;
|
||||
yscale = g_PlayerCrosshairSway * 0.30f;
|
||||
} else {
|
||||
scale = g_PlayerCrosshairSway;
|
||||
xscale = yscale = g_PlayerCrosshairSway;
|
||||
}
|
||||
x = g_Vars.currentplayer->speedtheta * 0.3f * scale + g_Vars.currentplayer->gunextraaimx;
|
||||
y = -g_Vars.currentplayer->speedverta * 0.1f * scale + g_Vars.currentplayer->gunextraaimy;
|
||||
x = g_Vars.currentplayer->speedtheta * 0.3f * xscale + g_Vars.currentplayer->gunextraaimx;
|
||||
y = -g_Vars.currentplayer->speedverta * 0.1f * yscale + g_Vars.currentplayer->gunextraaimy;
|
||||
#endif
|
||||
|
||||
bgunSwivelWithDamp(x, y, PAL ? 0.955f : 0.963f);
|
||||
|
||||
Reference in new issue
Block a user