// * 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.
// _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
// - 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 \"\""