summaryrefslogtreecommitdiffhomepage
path: root/src/con_.h
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2021-11-27 05:25:55 +0000
committerMichael Smith <mikesmiffy128@gmail.com>2021-12-26 23:58:00 +0000
commit7672d873478a67de599d2f701b4cc8ddc047ae01 (patch)
tree291172861b21476b6c6059817adcf920204ed3c6 /src/con_.h
parenteb6fc1676401bc71419db2239e350ae24f63ae4e (diff)
Unhide useful commands and allow cheats in lobbies
This is done through a new "fixes" file which will probably become one of those silly dumping grounds that every project has to have somewhere to put random miscellaneous crap in. These are mainly hidden in L4D2 but they just get unilaterally unhidden if they exist, just to be sure they're accessible. As a bonus, it turns out that unhiding a single cvar also allows us to set sv_cheats 1 in Left 4 Dead 2, bringing an end to the need to port- forward a listen server for co-op practice.
Diffstat (limited to 'src/con_.h')
-rw-r--r--src/con_.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/con_.h b/src/con_.h
index 4c662fe..f6ef161 100644
--- a/src/con_.h
+++ b/src/con_.h
@@ -144,9 +144,11 @@ struct con_var { // ConVar in engine
int minval;
bool hasmax; // just sticking to sdk position for now
int maxval;
- //void *cb; we don't currently bother with callback support. add if needed!
+ //void *cb; // we don't currently bother with callback support. add if needed!
};
+/* The change callback used in most branches of Source. Takes an IConVar :) */
+typedef void (*con_varcb)(void *v, const char *, float);
/*
* These functions get and set the values of console variables in a