diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2023-07-29 14:32:06 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2023-08-02 21:02:31 +0100 |
commit | 9a0d8730fa977f666b5c12e4c5901e7d0391e245 (patch) | |
tree | 87eebcdcef04ae1e7348ef80e972c08aa4783649 /src/engineapi.h | |
parent | d337b09936ecd90bad07b28b48b7103395d97ce5 (diff) |
Make various preparations for upcoming features
A lot of this is random WIP from a while back, at least a month ago, and
is being committed now to get it out of the way so that other patches
can be brought in and integrated against it without causing headaches.
Also rolled into this commit is a way to distinguish plugin_unload from
exiting the game. This is required for another soon-to-be-integrated
feature to avoid crashing on exit, and could in theory also be used to
speed up unloading on exit in future. While we're at it, this also
avoids the need to linearly scan through the plugin list to do the
old branch unloading fix, because we can.
Rough summary of the other smaller stuff I can remember doing:
- Rework bitbuf a bit
- Add some cryptographic nonsense in ac.c (not final at all)
- Introduce the first couple of "chunklets" libraries as a sort-of
subproject of this one
- Tidy up random small bits and bobs
- Add source for a small keypair generation tool
- Rework democustom to be very marginally more useful
Diffstat (limited to 'src/engineapi.h')
-rw-r--r-- | src/engineapi.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/engineapi.h b/src/engineapi.h index d740c8c..fbc062b 100644 --- a/src/engineapi.h +++ b/src/engineapi.h @@ -136,6 +136,23 @@ extern struct VEngineServer *engserver; 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]; + bool paused; + void *theplugin; // our own "this" pointer (or whichever other plugin it is) + int ifacever; + // should be the plugin library, but in old Source branches it's just null, + // because CServerPlugin::Load() erroneously shadows this field with a local + void *module; +}; +struct CServerPlugin /* : IServerPluginHelpers */ { + void **vtable; + struct CUtlVector plugins; + /*IPluginHelpersCheck*/ void *pluginhlpchk; +}; +extern struct CServerPlugin *pluginhandler; + /* * Called on plugin init to attempt to initialise various core interfaces. * This includes console/cvar initialisation and populating gametype and |