From 84c633c4dad25e420dcc1fe83d6d2da186d191a4 Mon Sep 17 00:00:00 2001 From: SCP-076 <84674379+SCP-076@users.noreply.github.com> Date: Sun, 2 Aug 2026 22:36:40 +0800 Subject: [PATCH] add zero-param ConVarChanged typeset signature (#2531) --- plugins/include/convars.inc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/plugins/include/convars.inc b/plugins/include/convars.inc index 907ed4d9..bf39280e 100644 --- a/plugins/include/convars.inc +++ b/plugins/include/convars.inc @@ -57,13 +57,24 @@ enum ConVarQueryResult }; /** - * Called when a console variable's value is changed. - * - * @param convar Handle to the convar that was changed. - * @param oldValue String containing the value of the convar before it was changed. - * @param newValue String containing the new value of the convar. + * Any of the following prototypes will work as a ConVarChanged callback. */ -typedef ConVarChanged = function void (ConVar convar, const char[] oldValue, const char[] newValue); +typeset ConVarChanged +{ + /** + * Called when a console variable's value is changed. + */ + function void (); + + /** + * Called when a console variable's value is changed. + * + * @param convar Handle to the convar that was changed. + * @param oldValue String containing the value of the convar before it was changed. + * @param newValue String containing the new value of the convar. + */ + function void (ConVar convar, const char[] oldValue, const char[] newValue); +}; /** * Creates a new console variable.