MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ReloadDynamicSettings

Method ReloadDynamicSettings

Source/Internal/config.cpp:425–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425void Config::ReloadDynamicSettings() {
426 Engine::Instance()->SetGameSpeed(config["global_time_scale_mult"].toNumber<float>(), true);
427 Engine::Instance()->GetSound()->SetMusicVolume(config.GetRef("music_volume").toNumber<float>());
428 Engine::Instance()->GetSound()->SetMasterVolume(config.GetRef("master_volume").toNumber<float>());
429 Graphics::Instance()->config_.motion_blur_amount_ = (float)config["motion_blur_amount"].toNumber<int>();
430 Input::Instance()->SetMouseSensitivity(config["mouse_sensitivity"].toNumber<float>());
431 Input::Instance()->UpdateGamepadLookSensitivity();
432 Input::Instance()->UpdateGamepadDeadzone();
433}
434
435void Config::ReloadStaticSettings() {
436 Input::Instance()->SetFromConfig(config);

Callers 5

DrawSettingsImGuiFunction · 0.80
AS_SetConfigValueStringFunction · 0.80
AS_SetConfigValueBoolFunction · 0.80
AS_SetConfigValueIntFunction · 0.80
AS_SetConfigValueFloatFunction · 0.80

Calls 8

SetGameSpeedMethod · 0.80
GetSoundMethod · 0.80
SetMouseSensitivityMethod · 0.80
UpdateGamepadDeadzoneMethod · 0.80
SetMusicVolumeMethod · 0.45
GetRefMethod · 0.45
SetMasterVolumeMethod · 0.45

Tested by

no test coverage detected