Add AI time dilation cheat
This commit is contained in:
@@ -28,6 +28,7 @@ static SetIntFn SetFOV = nullptr;
|
||||
static SetIntFn SetHUDScale = nullptr;
|
||||
static SetIntFn SetCameraOffset = nullptr;
|
||||
static SetFloatFn SetWorldTimeDilation = nullptr;
|
||||
static SetFloatFn SetAITimeDilation = nullptr;
|
||||
static SetFloatFn SetCameraSmoothness = nullptr;
|
||||
static GetGameInfosStruct GetGameInfos = nullptr;
|
||||
|
||||
@@ -38,14 +39,15 @@ static bool HUD_fix_enabled = false;
|
||||
static bool CA_fix_enabled = false;
|
||||
static bool Vignetting_fix_enabled = false;
|
||||
static bool Fog_fix_enabled = false;
|
||||
static bool World_Time_Dilation_fix_enabled = false;
|
||||
static bool prev_WorldTimeDilation = World_Time_Dilation_fix_enabled;
|
||||
static bool Time_Dilation_fix_enabled = false;
|
||||
static bool prev_TimeDilation = Time_Dilation_fix_enabled;
|
||||
static bool fix_enabled = false;
|
||||
static bool console = true;
|
||||
static int worldFOVValue = 0;
|
||||
static int HUDScaleValue = 0;
|
||||
static int cameraOffsetValue = 0;
|
||||
static float worldTimeDilationValue = 1.f;
|
||||
static float AITimeDilationValue = 1.f;
|
||||
static float cameraSmoothnessValue = 3.5f;
|
||||
|
||||
// Overlays popups
|
||||
@@ -55,15 +57,15 @@ static std::string log_content;
|
||||
|
||||
// Plugin settings
|
||||
const std::string SETTINGS_FILE = "./pluginsettings.ini";
|
||||
const char* FIX_VERSION = "0.9.4";
|
||||
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Control camera distance.\n - Control HUD scaling.\n - Control world time dilation.\n - Disable chromatic aberrations.\n - Disable vignetting.\n - Disable fog.\n - Re enable dev console.";
|
||||
const char* FIX_VERSION = "0.9.5";
|
||||
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Control camera distance.\n - Control HUD scaling.\n - Control time dilation.\n - Disable chromatic aberrations.\n - Disable vignetting.\n - Disable fog.\n - Re enable dev console.";
|
||||
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
|
||||
|
||||
// Scaling factor based on screen resolution
|
||||
float scale = (float)screenHeight / 1200;
|
||||
|
||||
extern "C" __declspec(dllexport) const char* NAME = "The Callisto Protocol";
|
||||
extern "C" __declspec(dllexport) const char* DESCRIPTION = "Reshade addon to re-enable console, control FOV, camera distance, world time dilation, HUD and some effects.";
|
||||
extern "C" __declspec(dllexport) const char* DESCRIPTION = "Reshade addon to re-enable console, control FOV, camera distance, time dilation, HUD and some effects.";
|
||||
|
||||
// Load and unload game core dll functions /!\ necessary
|
||||
static void LoadFixDLL()
|
||||
@@ -86,6 +88,7 @@ static void LoadFixDLL()
|
||||
SetHUDScale = (SetIntFn)GetProcAddress(fixLib, "SetHUDScale");
|
||||
SetCameraOffset = (SetIntFn)GetProcAddress(fixLib, "SetCameraOffset");
|
||||
SetWorldTimeDilation = (SetFloatFn)GetProcAddress(fixLib, "SetWorldTimeDilation");
|
||||
SetAITimeDilation = (SetFloatFn)GetProcAddress(fixLib, "SetAITimeDilation");
|
||||
SetCameraSmoothness = (SetFloatFn)GetProcAddress(fixLib, "SetCameraSmoothness");
|
||||
GetGameInfos = (GetGameInfosStruct)GetProcAddress(fixLib, "GetGameInfos");
|
||||
|
||||
@@ -94,6 +97,7 @@ static void LoadFixDLL()
|
||||
if (SetHUDScale) SetHUDScale(HUDScaleValue);
|
||||
if (SetCameraOffset) SetCameraOffset(cameraOffsetValue);
|
||||
if (SetWorldTimeDilation) SetWorldTimeDilation(worldTimeDilationValue);
|
||||
if (SetAITimeDilation) SetAITimeDilation(AITimeDilationValue);
|
||||
if (SetCameraSmoothness) SetCameraSmoothness(cameraSmoothnessValue);
|
||||
if (SetFixEnabled) SetFixEnabled(fix_enabled, true);
|
||||
if (SetFixesEnabled) {
|
||||
@@ -103,7 +107,7 @@ static void LoadFixDLL()
|
||||
SetFixesEnabled(GameFixes::ChromaticAberrations, CA_fix_enabled);
|
||||
SetFixesEnabled(GameFixes::Vignetting, Vignetting_fix_enabled);
|
||||
SetFixesEnabled(GameFixes::Fog, Fog_fix_enabled);
|
||||
SetFixesEnabled(GameFixes::WorldTimeDilation, World_Time_Dilation_fix_enabled);
|
||||
SetFixesEnabled(GameFixes::WorldTimeDilation, Time_Dilation_fix_enabled);
|
||||
SetFixesEnabled(GameFixes::DevConsole, console);
|
||||
}
|
||||
}
|
||||
@@ -127,12 +131,13 @@ static void SaveSettings()
|
||||
pluginIniFile["2#Individual fix"]["Chromatic aberrations"] = CA_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Vignetting"] = Vignetting_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Fog"] = Fog_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["World time dilation"] = World_Time_Dilation_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Time dilation"] = Time_Dilation_fix_enabled;
|
||||
pluginIniFile["3#Fixes tuning"].setComment("Individual fix fine tune");
|
||||
pluginIniFile["3#Fixes tuning"]["World FOV"] = worldFOVValue;
|
||||
pluginIniFile["3#Fixes tuning"]["HUD scale"] = HUDScaleValue;
|
||||
pluginIniFile["3#Fixes tuning"]["Camera offset"] = cameraOffsetValue;
|
||||
pluginIniFile["3#Fixes tuning"]["World time dilation scale"] = worldTimeDilationValue;
|
||||
pluginIniFile["3#Fixes tuning"]["AI time dilation scale"] = AITimeDilationValue;
|
||||
pluginIniFile["3#Fixes tuning"]["Camera smoothness"] = cameraSmoothnessValue;
|
||||
|
||||
pluginIniFile.save(SETTINGS_FILE);
|
||||
@@ -151,11 +156,12 @@ static void LoadSettings()
|
||||
CA_fix_enabled = pluginIniFile["2#Individual fix"]["Chromatic aberrations"].as<bool>();
|
||||
Vignetting_fix_enabled = pluginIniFile["2#Individual fix"]["Vignetting"].as<bool>();
|
||||
Fog_fix_enabled = pluginIniFile["2#Individual fix"]["Fog"].as<bool>();
|
||||
World_Time_Dilation_fix_enabled = pluginIniFile["2#Individual fix"]["World time dilation"].as<bool>();
|
||||
Time_Dilation_fix_enabled = pluginIniFile["2#Individual fix"]["Time dilation"].as<bool>();
|
||||
worldFOVValue = pluginIniFile["3#Fixes tuning"]["World FOV"].as<int>();
|
||||
HUDScaleValue = pluginIniFile["3#Fixes tuning"]["HUD scale"].as<int>();
|
||||
cameraOffsetValue = pluginIniFile["3#Fixes tuning"]["Camera offset"].as<float>();
|
||||
worldTimeDilationValue = pluginIniFile["3#Fixes tuning"]["World time dilation scale"].as<float>();
|
||||
AITimeDilationValue = pluginIniFile["3#Fixes tuning"]["AI time dilation scale"].as<float>();
|
||||
cameraSmoothnessValue = pluginIniFile["3#Fixes tuning"]["Camera smoothness"].as<float>();
|
||||
}
|
||||
catch (const std::exception& e) {}
|
||||
@@ -216,142 +222,176 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
||||
}
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2(10 * scale, 10 * scale));
|
||||
if (ImGui::BeginTable("FixesTable", 2, ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableSetupColumn("LeftFix", ImGuiTableColumnFlags_WidthStretch, 0.4f);
|
||||
ImGui::TableSetupColumn("RightFix", ImGuiTableColumnFlags_WidthStretch, 0.6f);
|
||||
ImGui::TableNextRow();
|
||||
|
||||
// Drawing a left column with slider and general fix
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
|
||||
if (SetFixEnabled) SetFixEnabled(fix_enabled, false);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
// Individual fixes
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
if (ImGui::BeginTable("IndividualFixesTable", 2, ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableSetupColumn("IndFix1", ImGuiTableColumnFlags_WidthStretch, 0.35f);
|
||||
ImGui::TableSetupColumn("IndFix2", ImGuiTableColumnFlags_WidthStretch, 0.65f);
|
||||
if (ImGui::BeginTabBar("MainTabs")) {
|
||||
if (ImGui::BeginTabItem("Fixes")) {
|
||||
if (ImGui::BeginTable("FixesTable", 2, ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableSetupColumn("LeftFix", ImGuiTableColumnFlags_WidthStretch, 0.4f);
|
||||
ImGui::TableSetupColumn("RightFix", ImGuiTableColumnFlags_WidthStretch, 0.6f);
|
||||
ImGui::TableNextRow();
|
||||
|
||||
// Drawing a left column with slider and general fix
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
if (ImGui::Checkbox("FOV", &fov_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::FOV, fov_fix_enabled);
|
||||
SaveSettings();
|
||||
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
|
||||
if (SetFixEnabled) SetFixEnabled(fix_enabled, false);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
// Individual fixes
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
if (ImGui::BeginTable("IndividualFixesTable", 2, ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableSetupColumn("IndFix1", ImGuiTableColumnFlags_WidthStretch, 0.35f);
|
||||
ImGui::TableSetupColumn("IndFix2", ImGuiTableColumnFlags_WidthStretch, 0.65f);
|
||||
ImGui::TableNextRow();
|
||||
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
if (ImGui::Checkbox("FOV", &fov_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::FOV, fov_fix_enabled);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Fog", &Fog_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::Fog, Fog_fix_enabled);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Vignetting", &Vignetting_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::Vignetting, Vignetting_fix_enabled);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
if (ImGui::Checkbox("Camera distance", &Camera_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::Camera, Camera_fix_enabled);
|
||||
SaveSettings();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Experimental fix. Use at your own risk.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("HUD scaling", &HUD_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::HUD, HUD_fix_enabled);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Chromatic aberrations", &CA_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::ChromaticAberrations, CA_fix_enabled);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("SlidersTable", 2, ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableSetupColumn("LeftSliders", ImGuiTableColumnFlags_WidthStretch, 0.5f);
|
||||
ImGui::TableSetupColumn("RightSliders", ImGuiTableColumnFlags_WidthStretch, 0.5f);
|
||||
ImGui::TableNextRow();
|
||||
|
||||
// Sliders
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderInt("##FOVValue", &worldFOVValue, -20, 50)) {
|
||||
if (SetFOV) SetFOV(worldFOVValue);
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Fog", &Fog_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::Fog, Fog_fix_enabled);
|
||||
SaveSettings();
|
||||
if (ImGui::CollapsingHeader("Camera offset (*)", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(200 * scale);
|
||||
if (ImGui::SliderInt("##CameraOffset", &cameraOffsetValue, 0, 200)) {
|
||||
if (SetCameraOffset) SetCameraOffset(cameraOffsetValue); SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Vignetting", &Vignetting_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::Vignetting, Vignetting_fix_enabled);
|
||||
SaveSettings();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Value is in cms.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
if (ImGui::Checkbox("Camera distance", &Camera_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::Camera, Camera_fix_enabled);
|
||||
SaveSettings();
|
||||
if (ImGui::CollapsingHeader("HUD scaling", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderInt("##HUDScale", &HUDScaleValue, 0, 40)) {
|
||||
if (SetHUDScale) SetHUDScale(HUDScaleValue); SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Camera smoothness (*)", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderFloat("##CameraSmoothnessValue", &cameraSmoothnessValue, 2, 10, "%.2f")) {
|
||||
if (SetCameraSmoothness) SetCameraSmoothness(cameraSmoothnessValue); SaveSettings();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Experimental fix. Use at your own risk.");
|
||||
ImGui::Text("The higher the value, the quicker the camera transition is.");
|
||||
ImGui::Text("Used in combination with camera distance fix.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Checkbox("World time dilation", &World_Time_Dilation_fix_enabled);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Use ALT + F1 shortcut to de/activate.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("HUD scaling", &HUD_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::HUD, HUD_fix_enabled);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Chromatic aberrations", &CA_fix_enabled)) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::ChromaticAberrations, CA_fix_enabled);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("SlidersTable", 2, ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableSetupColumn("LeftSliders", ImGuiTableColumnFlags_WidthStretch, 0.5f);
|
||||
ImGui::TableSetupColumn("RightSliders", ImGuiTableColumnFlags_WidthStretch, 0.5f);
|
||||
ImGui::TableNextRow();
|
||||
|
||||
// Sliders
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
if (ImGui::BeginTabItem("Cheats"))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderInt("##FOVValue", &worldFOVValue, -20, 50)) {
|
||||
if (SetFOV) SetFOV(worldFOVValue);
|
||||
SaveSettings();
|
||||
ImGui::Checkbox("Time dilation", &Time_Dilation_fix_enabled);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Use ALT + F1 shortcut to de/activate.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Camera offset (*)", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(200 * scale);
|
||||
if (ImGui::SliderInt("##CameraOffset", &cameraOffsetValue, 0, 200)) {
|
||||
if (SetCameraOffset) SetCameraOffset(cameraOffsetValue); SaveSettings();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Value is in cms.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
if (ImGui::BeginTable("SlidersTable", 2, ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableSetupColumn("LeftSliders", ImGuiTableColumnFlags_WidthStretch, 0.5f);
|
||||
ImGui::TableSetupColumn("RightSliders", ImGuiTableColumnFlags_WidthStretch, 0.5f);
|
||||
ImGui::TableNextRow();
|
||||
|
||||
if (ImGui::CollapsingHeader("World time dilation", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderFloat("##WorldTimeDilationValue", &worldTimeDilationValue, 0, 2, "%.2f")) {
|
||||
if (SetWorldTimeDilation) SetWorldTimeDilation(worldTimeDilationValue); SaveSettings();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Default value is 1.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
if (ImGui::CollapsingHeader("World time dilation", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderFloat("##WorldTimeDilationValue", &worldTimeDilationValue, 0, 2, "%.2f")) {
|
||||
if (SetWorldTimeDilation) SetWorldTimeDilation(worldTimeDilationValue); SaveSettings();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Will affect everything in the world.");
|
||||
ImGui::Text("Default value is 1.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
if (ImGui::CollapsingHeader("HUD scaling", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderInt("##HUDScale", &HUDScaleValue, 0, 40)) {
|
||||
if (SetHUDScale) SetHUDScale(HUDScaleValue); SaveSettings();
|
||||
if (ImGui::CollapsingHeader("AI time dilation", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderFloat("##AITimeDilationValue", &AITimeDilationValue, 0, 2, "%.2f")) {
|
||||
if (SetAITimeDilation) SetAITimeDilation(AITimeDilationValue); SaveSettings();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Will affect only enemies in the world.");
|
||||
ImGui::Text("Default value is 1.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Camera smoothness (*)", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::SetNextItemWidth(180 * scale);
|
||||
if (ImGui::SliderFloat("##CameraSmoothnessValue", &cameraSmoothnessValue, 2, 10, "%.2f")) {
|
||||
if (SetCameraSmoothness) SetCameraSmoothness(cameraSmoothnessValue); SaveSettings();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("The higher the value, the quicker the camera transition is.");
|
||||
ImGui::Text("Used in combination with camera distance fix.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::EndTable();
|
||||
ImGui::EndTabBar();
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
@@ -369,15 +409,18 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
||||
}
|
||||
|
||||
static void on_reshade_present(reshade::api::effect_runtime* runtime) {
|
||||
if (runtime->is_key_pressed(VK_F1) && runtime->is_key_down(VK_MENU))
|
||||
World_Time_Dilation_fix_enabled = !World_Time_Dilation_fix_enabled;
|
||||
static bool wasTimeDilationInvoked = false;
|
||||
bool timeDilationInvoked = runtime->is_key_down(VK_MENU) && runtime->is_key_down(VK_F1);
|
||||
|
||||
if (prev_WorldTimeDilation != World_Time_Dilation_fix_enabled) {
|
||||
if (SetFixesEnabled)
|
||||
SetFixesEnabled(GameFixes::WorldTimeDilation, World_Time_Dilation_fix_enabled);
|
||||
if (timeDilationInvoked && !wasTimeDilationInvoked)
|
||||
Time_Dilation_fix_enabled = !Time_Dilation_fix_enabled;
|
||||
|
||||
wasTimeDilationInvoked = timeDilationInvoked;
|
||||
|
||||
if (prev_TimeDilation != Time_Dilation_fix_enabled) {
|
||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::WorldTimeDilation, Time_Dilation_fix_enabled); // Apply cheat
|
||||
SaveSettings();
|
||||
prev_WorldTimeDilation = World_Time_Dilation_fix_enabled;
|
||||
prev_TimeDilation = Time_Dilation_fix_enabled;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user