forked from Ports/perfect_dark
port: mouselook speed now independent of framerate
This commit is contained in:
1 parent
5bb4f1d193
commit
11e318b70f
3 files changed
+5
-6
No files matched your search
@@ -922,8 +922,6 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
f32 mdx, mdy;
|
||||
inputMouseGetScaledDelta(&mdx, &mdy);
|
||||
if (mdx || mdy) {
|
||||
mdx *= g_Vars.lvupdate60freal;
|
||||
mdy *= g_Vars.lvupdate60freal;
|
||||
if (g_Vars.currentplayerstats && !optionsGetForwardPitch(g_Vars.currentplayerstats->mpindex)) {
|
||||
mdy = -mdy;
|
||||
}
|
||||
|
||||
+3
-2
@@ -714,6 +714,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
#ifndef PLATFORM_N64
|
||||
const bool allowmlook = (g_Vars.currentplayernum == 0) && (allowc1x || allowc1y);
|
||||
bool allowmcross = false;
|
||||
const f32 mlookscale = g_Vars.lvupdate240 ? (4.f / (f32)g_Vars.lvupdate240) : 0.25f;
|
||||
#endif
|
||||
|
||||
controlmode = optionsGetControlMode(g_Vars.currentplayerstats->mpindex);
|
||||
@@ -2017,7 +2018,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
fVar25 += movedata.freelookdy;
|
||||
fVar25 += movedata.freelookdy * mlookscale;
|
||||
#endif
|
||||
|
||||
g_Vars.currentplayer->speedverta = -fVar25 * tmp;
|
||||
@@ -2058,7 +2059,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
fVar25 += movedata.freelookdx;
|
||||
fVar25 += movedata.freelookdx * mlookscale;
|
||||
#endif
|
||||
|
||||
g_Vars.currentplayer->speedthetacontrol = fVar25 * tmp;
|
||||
|
||||
+2
-2
@@ -3592,8 +3592,8 @@ void playerTick(bool arg0)
|
||||
if (g_Vars.currentplayerstats && !optionsGetForwardPitch(g_Vars.currentplayerstats->mpindex)) {
|
||||
mdy = -mdy;
|
||||
}
|
||||
sp178 += mdy * LVUPDATE60FREAL() * 0.00025f;
|
||||
sp174 -= mdx * LVUPDATE60FREAL() * 0.00025f;
|
||||
sp178 += mdy * 0.00025f;
|
||||
sp174 -= mdx * 0.00025f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user