Skip to content

Commit

Permalink
fix: mel demos
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisAMJ committed May 11, 2024
1 parent 415abee commit 544451c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion srconfigs/srconfigs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ sar_record_at_demo_name ""
sar_record_at 0
sar_on_load sar_record_at 0
sar_on_load cond "game=portal2 & map=mp_coop_wall_5" sar_record_at 120 // Prevent silly crash
sar_on_load cond "game=mel" non_cm_only sar_record_at -1

// Deprecated utility function
sar_function __choose conds "$1" "$2" "$3"
Expand Down Expand Up @@ -246,6 +245,7 @@ sar_function __cat_loop_h cond "!?__cat_i=?__detect_len" "$__loopcmd; svar_add _
// If the category has changed, stop demo recording
sar_function __detect "svar_set __old_category $category; __cat_loop $'sar_expand sar_expand __detect_$$$$__cat_$$__cat_i$'; cond !?category=?__old_category stop"
sar_alias __record cond "!?__suppress_record=1" record ""
cond "game=mel" sar_alias __record cond "!?__suppress_record=1" cm_only record ""
// The 'cat command' is ran every load while using a category, as well as
// when switching to it.
sar_function add_cat_cmd "sar_alias $1 $'stop; svar_set category $1; __force_warn $1; __run_cat_$1; __record$'; svar_set __cat_$__detect_len $1; sar_alias __run_cat_$1 $'$2$'; sar_alias __detect_$1 nop; svar_add __detect_len 1"
Expand Down Expand Up @@ -275,6 +275,7 @@ sar_on_config_exec conds "?enable_menu_transitions=1" "ui_transition_effect 1" "

// If we're suppressing recording, unset sar_record_at
sar_on_load cond "?__suppress_record=1" sar_record_at -1
sar_on_load cond "game=mel" non_cm_only sar_record_at -1
// Create the built-in categories
add_cat fullgame
Expand Down

0 comments on commit 544451c

Please sign in to comment.