From 2ee93c3f46f8e948d2331eab46c95322a88874ee Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 3 Apr 2026 21:45:17 +0100 Subject: Size-optimise cvar value cleanup Put all the cvars together contiguously; then we don't need to generate lots of individual calls to extfree() and can instead simply iterate a fixed-sized array. --- src/sst.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/sst.c') diff --git a/src/sst.c b/src/sst.c index e732073..bbcae79 100644 --- a/src/sst.c +++ b/src/sst.c @@ -14,8 +14,6 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#include - #ifdef _WIN32 #include #include @@ -28,7 +26,6 @@ #include "engineapi.h" #include "errmsg.h" #include "event.h" -#include "extmalloc.h" // for freevars() in generated code #include "feature.h" #include "fixes.h" #include "gamedata.h" @@ -543,7 +540,6 @@ static opt_small void hook_plugin_unload_cbv2(struct con_cmdargs *args) { static inline bool do_load(ifacefactory enginef, ifacefactory serverf) { factory_engine = enginef; factory_server = serverf; if_cold (!engineapi_init(ifacever)) return false; - if (GAMETYPE_MATCHES(OE)) shuntvars(); // see also comment in con_detect() const void **p = vtable_firstdiff; if (GAMETYPE_MATCHES(Portal2)) *p++ = (void *)&nop_p_v; // ClientFullyConnect *p++ = (void *)&nop_p_v; // ClientDisconnect @@ -598,7 +594,6 @@ static inline void do_unload() { } endfeatures(); con_disconnect(); - freevars(); } static bool VCALLCONV Load(void *this, ifacefactory enginef, -- cgit v1.2.3-54-g00ecf