Split camera distance into in and outdoor
This commit is contained in:
@@ -21,7 +21,8 @@ static bool g_fix_enabled = false;
|
|||||||
static bool g_fov_fix_enabled = false;
|
static bool g_fov_fix_enabled = false;
|
||||||
static bool g_camera_fix_enabled = false;
|
static bool g_camera_fix_enabled = false;
|
||||||
static int g_AdditionalFOVValue = 0;
|
static int g_AdditionalFOVValue = 0;
|
||||||
static float g_CameraMultiplier = 1.f;
|
static float g_OutdoorCameraMultiplier = 1.f;
|
||||||
|
static float g_IndoorCameraMultiplier = 1.f;
|
||||||
static bool g_PendingCameraRefresh = true;
|
static bool g_PendingCameraRefresh = true;
|
||||||
static float g_CameraIn = 1.f;
|
static float g_CameraIn = 1.f;
|
||||||
static float g_CameraOut = 1.f;
|
static float g_CameraOut = 1.f;
|
||||||
@@ -138,7 +139,11 @@ extern "C" __declspec(dllexport) void SetFixesEnabled(GameFixes fix, bool enable
|
|||||||
extern "C" __declspec(dllexport) void SetValues(GameSetting setting, float value) {
|
extern "C" __declspec(dllexport) void SetValues(GameSetting setting, float value) {
|
||||||
if (setting == GameSetting::FOV) g_AdditionalFOVValue = (int)(value);
|
if (setting == GameSetting::FOV) g_AdditionalFOVValue = (int)(value);
|
||||||
if (setting == GameSetting::CameraDistance) {
|
if (setting == GameSetting::CameraDistance) {
|
||||||
g_CameraMultiplier = value;
|
g_OutdoorCameraMultiplier = value;
|
||||||
|
ForceCameraRefresh();
|
||||||
|
}
|
||||||
|
if (setting == GameSetting::AITimeDilation) {
|
||||||
|
g_IndoorCameraMultiplier = value;
|
||||||
ForceCameraRefresh();
|
ForceCameraRefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,7 +203,7 @@ static void CameraFixEnabled() {
|
|||||||
if (thirdPersonInstance != currentInstance)
|
if (thirdPersonInstance != currentInstance)
|
||||||
thirdPersonInstance = currentInstance; // Refresh third person instance
|
thirdPersonInstance = currentInstance; // Refresh third person instance
|
||||||
g_CameraIn = (float)ctx.xmm0.f64[0];
|
g_CameraIn = (float)ctx.xmm0.f64[0];
|
||||||
ctx.xmm0.f64[0] *= g_CameraMultiplier; // Apply multiplier
|
ctx.xmm0.f64[0] *= g_CameraIn < 1.7 ? g_IndoorCameraMultiplier : g_OutdoorCameraMultiplier; // Apply multiplier
|
||||||
g_CameraOut = (float)ctx.xmm0.f64[0];
|
g_CameraOut = (float)ctx.xmm0.f64[0];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user