summaryrefslogtreecommitdiff
path: root/src/engineapi.h
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-06-06 21:31:44 +0100
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-06-07 14:05:06 +0100
commit84b518298c32f79ef5d4f056d6d8e8c251417b8a (patch)
treef76068ea9b768dc553abf22eafe889a50d92769c /src/engineapi.h
parent4d220c77c2172d5272ed586b4a2f45968eda3403 (diff)
downloadsst-84b518298c32f79ef5d4f056d6d8e8c251417b8a.tar.gz
sst-84b518298c32f79ef5d4f056d6d8e8c251417b8a.zip
Improve the plugin_load/plugin_unload hooks
Most notably, don't just silently return when no parameter is provided; allow the default handler to print the usual error message. Also, don't raise the PluginLoaded/PluginUnloaded events when nothing has actually happened. And rearrange the v1/v2 union so we don't need to spell out `v2.common`. Error message issue pointed out by Evan Lin - thanks!
Diffstat (limited to 'src/engineapi.h')
-rw-r--r--src/engineapi.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/engineapi.h b/src/engineapi.h
index ef716a9..4118a3c 100644
--- a/src/engineapi.h
+++ b/src/engineapi.h
@@ -23,7 +23,6 @@
#define INC_ENGINEAPI_H
#include "intdefs.h"
-#include "vcall.h"
/*
* Here, we define a bunch of random data types as well as interfaces that don't
@@ -128,7 +127,7 @@ extern struct CGlobalVars *globalvars;
extern struct IInputSystem *inputsystem;
extern struct CEngineVGui *vgui;
-// XXX: not exactly engine *API* but not curently clear where else to put this
+// XXX: not exactly engine *API* but not currently clear where else to put this
struct CPlugin_common {
bool paused;
void *theplugin; // our own "this" pointer (or whichever other plugin it is)
@@ -143,8 +142,8 @@ struct CPlugin {
struct CPlugin_common v1;
struct {
char basename[128]; // WHY VALVE WHYYYYYYY!!!!
- struct CPlugin_common common;
- } v2;
+ struct CPlugin_common v2;
+ };
};
};
struct CServerPlugin /* : IServerPluginHelpers */ {