mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
port: add ini config parameter to control whether ini FOV change should affect the max zoom of weapons
This commit is contained in:
1 parent
85c1adb258
commit
96bd8e05aa
4 files changed
+9
-1
No files matched your search
@@ -71,6 +71,7 @@ static void gameLoadConfig(void)
|
||||
g_PlayerMouseAimMode = configGetIntClamped("Game.MouseAimMode", g_PlayerMouseAimMode, 0, 1);
|
||||
g_PlayerMouseAimSpeedX = configGetFloatClamped("Game.MouseAimSpeedX", g_PlayerMouseAimSpeedX, 0.f, 10.f);
|
||||
g_PlayerMouseAimSpeedY = configGetFloatClamped("Game.MouseAimSpeedY", g_PlayerMouseAimSpeedY, 0.f, 10.f);
|
||||
g_PlayerFovAffectsZoom = configGetIntClamped("Game.FovAffectsZoom", g_PlayerFovAffectsZoom, 0, 1);
|
||||
}
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
|
||||
@@ -212,7 +212,12 @@ f32 currentPlayerGetGunZoomFov(void)
|
||||
#ifdef PLATFORM_N64
|
||||
return fov;
|
||||
#else
|
||||
return fov * (g_PlayerDefaultFovY / 60.0f);
|
||||
if (g_PlayerFovAffectsZoom) {
|
||||
return fov * (g_PlayerDefaultFovY / 60.0f);
|
||||
}
|
||||
else {
|
||||
return fov;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -208,6 +208,7 @@ f32 g_PlayerCrosshairSway = 1.f;
|
||||
s32 g_PlayerMouseAimMode = MOUSEAIM_CLASSIC;
|
||||
f32 g_PlayerMouseAimSpeedX = 0.75f;
|
||||
f32 g_PlayerMouseAimSpeedY = 0.75f;
|
||||
s32 g_PlayerFovAffectsZoom = 1;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -534,6 +534,7 @@ extern f32 g_PlayerDefaultFovY;
|
||||
extern s32 g_PlayerMouseAimMode;
|
||||
extern f32 g_PlayerMouseAimSpeedX;
|
||||
extern f32 g_PlayerMouseAimSpeedY;
|
||||
extern s32 g_PlayerFovAffectsZoom;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user