diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2023-11-26 19:17:43 +0000 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2023-11-26 21:35:57 +0000 |
commit | 852ff29088e08a9f1673a070f5ff151e23e393ec (patch) | |
tree | de57f2f0804ffb36aaddd24c37ed17afd598f9e5 /src/engineapi.h | |
parent | 6ed562049ec6df12d436a7d44cd3d705c523a01c (diff) |
Fix CPlugin ABI on newer L4D2 versions
Thanks bill for spotting this issue. It was causing crashes on unload,
which is obviously no good.
Diffstat (limited to 'src/engineapi.h')
-rw-r--r-- | src/engineapi.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/engineapi.h b/src/engineapi.h index e95e282..44366f5 100644 --- a/src/engineapi.h +++ b/src/engineapi.h @@ -137,8 +137,7 @@ extern void *globalvars; extern void *inputsystem, *vgui; // XXX: not exactly engine *API* but not curently clear where else to put this -struct CPlugin { - char description[128]; +struct CPlugin_common { bool paused; void *theplugin; // our own "this" pointer (or whichever other plugin it is) int ifacever; @@ -146,6 +145,16 @@ struct CPlugin { // because CServerPlugin::Load() erroneously shadows this field with a local void *module; }; +struct CPlugin { + char description[128]; + union { + struct CPlugin_common v1; + struct { + char basename[128]; // WHY VALVE WHYYYYYYY!!!! + struct CPlugin_common common; + } v2; + }; +}; struct CServerPlugin /* : IServerPluginHelpers */ { void **vtable; struct CUtlVector plugins; |