p2sr / SourceAutoRecord

Speedrun plugin for Source engine games.
https://sar.portal2.sr/
MIT License
93 stars 29 forks source link

fix: dont record various commands #100

Closed ThisAMJ closed 1 year ago

ThisAMJ commented 1 year ago

When was the last time someone used sar_hud_inspection? Is it worth cheat-protecting? Certainly looks quite cheaty

Newly unrecorded commands:

Modified help strings for:

LMK if there's anything else that deserves not recording :)

ThisAMJ commented 1 year ago

whoops: when flags are changed from 0 on certain cvars they are given 0-1 range, because that makes sense.

ThisAMJ commented 1 year ago

more precisely, src/Variable.cpp@36

// Boolean or String
Variable::Variable(const char *name, const char *value, const char *helpstr, int flags, FnChangeCallback_t callback)
    : Variable() {
    if (flags != 0)
        Create(name, value, flags, helpstr, true, 0, true, 1, callback);
    else
        Create(name, value, flags, helpstr, false, 0, false, 0, callback);
}