From f385da8a6b65adffea10561538a9d5cd22a84123 Mon Sep 17 00:00:00 2001 From: ferreum Date: Wed, 16 Feb 2022 23:29:35 +0100 Subject: [PATCH] provide input-demoseeking.cfg script for compatibility Same as demoseeking.cfg with historic bindings, so old instructions still work. Removes the new _demoseeking_bind_keys option again. --- demoseeking.cfg | 25 +++++++++++-------------- input-demoseeking.cfg | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 input-demoseeking.cfg diff --git a/demoseeking.cfg b/demoseeking.cfg index 5ffad3a04..a70dd5d60 100644 --- a/demoseeking.cfg +++ b/demoseeking.cfg @@ -7,15 +7,19 @@ // hook to autoexec.cfg. If you already have a cl_hook_gamestart_all hook, add // the quoted command to your hook, separated with a semicolon: // -// exec input-demoseeking.cfg +// exec demoseeking.cfg // alias cl_hook_gamestart_all "demoseeking_game_started" // // Usage: -// - start a demo (ply/playdemo command or menu) -// - use ,. (comma and dot) keys to seek -5/+5 seconds -// - use m/ (m and slash) keys to seek -30/+30 seconds, - (minus) also -// works instead of slash -// - or use the "seekdemo " command directly +// 1. start a demo (ply/playdemo command or menu), and +// 2. while in a demo, use the "seekdemo " command +// +// Alternatively, use input-demoseeking.cfg instead to restore the default +// bindings: +// +// * use ,. (comma and dot) keys to seek -5/+5 seconds +// * use m/ (m and slash) keys to seek -30/+30 seconds +// * - (minus) also works instead of slash // // Options (persisted): // @@ -26,9 +30,6 @@ // much while seeking. If the framerate is still high while seeking, you // may increase this, but increasing this with low framerate is unlikely to // improve seek performance. -// _demoseeking_bind_keys -// Whether to set default seekdemo bindings listed under "Usage" above. -// Default 1. Set to 0 to disable the bindings. // // Variables: // @@ -57,7 +58,7 @@ alias _demoseeking_init_vars1 "" _demoseeking_init_vars${_demoseeking_vars_loaded ?} // option initialization (persistent) -alias _demoseeking_init_options "seta _demoseeking_options_loaded 1; seta _demoseeking_min_speed 1.5; seta _demoseeking_max_speed 200; seta _demoseeking_bind_keys 1" +alias _demoseeking_init_options "seta _demoseeking_options_loaded 1; seta _demoseeking_min_speed 1.5; seta _demoseeking_max_speed 200" alias _demoseeking_init_options1 "" _demoseeking_init_options${_demoseeking_options_loaded ?} @@ -176,7 +177,3 @@ alias _seekdemo_set_options_2 "r_render 0; snd_startnonloopingsounds 0; _seekdem alias _seekdemo_save_options "set _seekdemo_sav_cl_decals \"$cl_decals\"; set _seekdemo_sav_cl_damagetext \"$cl_damagetext\"; set _seekdemo_sav_cl_particles \"$cl_particles\"; set _seekdemo_sav_cl_casings \"$cl_casings\"; set _seekdemo_sav_slowmo \"$slowmo\"" alias _seekdemo_settemp_options "settemp cl_decals 0; settemp cl_damagetext 0; settemp cl_particles 0; settemp cl_casings 0" alias _seekdemo_restore_options "settemp cl_decals \"$_seekdemo_sav_cl_decals\"; settemp cl_damagetext \"$_seekdemo_sav_cl_damagetext\"; settemp cl_particles \"$_seekdemo_sav_cl_particles\"; settemp cl_casings \"$_seekdemo_sav_cl_casings\"" - -alias _demoseeking_bind_keys_0 "" -alias _demoseeking_bind_keys_1 "bind , \"seekdemo -5\"; bind . \"seekdemo +5\"; bind m \"seekdemo -30\"; bind - \"seekdemo +30\"; bind / \"seekdemo +30\"" -_demoseeking_bind_keys_${_demoseeking_bind_keys ?} diff --git a/input-demoseeking.cfg b/input-demoseeking.cfg new file mode 100644 index 000000000..b4250f06e --- /dev/null +++ b/input-demoseeking.cfg @@ -0,0 +1,19 @@ +// +// Make sure to follow the setup in demoseeking.cfg. +// +// This script loads demoseeking.cfg with the original bindings: +// +// * ,. (comma and dot) keys to seek -5/+5 seconds +// * m/ (m and slash) keys to seek -30/+30 seconds +// * - (minus) also works instead of slash +// +// To use demoseeking without these bindings, do `exec demoseeking.cfg` +// instead. + +exec demoseeking.cfg + +bind , "seekdemo -5" +bind . "seekdemo +5" +bind m "seekdemo -30" +bind - "seekdemo +30" +bind / "seekdemo +30" -- 2.39.2