Divergent/mods/Outfit Animations/gamedata/scripts/outfit_animations_fov_manag...

32 lines
502 B
Plaintext
Raw Permalink Normal View History

2024-03-17 20:18:03 -04:00
local default_fov
function on_game_start()
RegisterScriptCallback("on_game_load", on_game_load)
RegisterScriptCallback("on_option_change", on_option_change)
end
function on_game_load()
write_fov()
end
function on_option_change()
write_fov()
end
function write_fov()
default_fov = ui_options.get("video/basic/hud_fov")
end
function set_fov(new_fov)
exec_console_cmd("hud_fov " .. new_fov)
end
function restore_fov()
exec_console_cmd("hud_fov " .. default_fov)
end