From: ferreum Date: Fri, 18 Mar 2022 15:15:04 +0000 (+0100) Subject: make demoseeking options non-persisted X-Git-Tag: xonotic-v0.8.5~141^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b5ae0476168cda0932dd943c4668e29aa809f7ab;p=xonotic%2Fxonotic-data.pk3dir.git make demoseeking options non-persisted --- diff --git a/demoseeking.cfg b/demoseeking.cfg index 30c9d9f31..5dbaf86b3 100644 --- a/demoseeking.cfg +++ b/demoseeking.cfg @@ -21,7 +21,9 @@ // * use m/ (m and slash) keys to seek -30/+30 seconds // * - (minus) also works instead of slash // -// Options (persisted): +// Options: +// +// These options can be customized after "exec demoseeking.cfg". // // _demoseeking_min_speed // Minimum seek speed. Default 1.5. @@ -40,8 +42,6 @@ // _demoseeking_fast_speed // Seek speed above which rendering is disabled. Default 80. // -// Type demoseeking_reset_options in the console to reset all options. -// // Variables: // // _demo_is_playing @@ -63,17 +63,18 @@ // - The alias seekdemo_getseektime can be used by scripts to get the current // playback time or seek target time. See its usage below. +// option initialization +set _demoseeking_options_loaded 1 +set _demoseeking_min_speed 1.5 +set _demoseeking_max_speed 200 +set _demoseeking_fast_speed 80 +set _demoseeking_speed_factor 10 + // state initialization alias _demoseeking_init_vars "set _demoseeking_vars_loaded 1; set _demo_is_playing 0; set _current_demo_name \"\"; set _demoseeking_is_seeking 0; set _seekdemo_state idle; set _seekdemo_target 0; alias playdemo_hook \"\"; alias seekdemo_hook_seek_end" alias _demoseeking_init_vars1 "" _demoseeking_init_vars${_demoseeking_vars_loaded ?} -// option initialization (persistent) -alias demoseeking_reset_options "seta _demoseeking_options_loaded 1; seta _demoseeking_min_speed 1.5; seta _demoseeking_max_speed 200; seta _demoseeking_fast_speed 80; seta _demoseeking_speed_factor 10" -alias _demoseeking_init_options demoseeking_reset_options -alias _demoseeking_init_options1 "" -_demoseeking_init_options${_demoseeking_options_loaded ?} - // Hook into game start to reset seekdemo state. This prevents reloading the // last demo when seekdemo is accidentally called during an actual game. alias demoseeking_game_started "set _demo_is_playing 0; set _current_demo_name \"\""