summaryrefslogtreecommitdiffhomepage
path: root/src/sst.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-07-23 23:47:26 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-07-23 23:47:26 +0100
commitc8d7588251fd4fe63ac6afe2a90ca7066c786609 (patch)
treef547831424d20c6f1b3f2b6bdea97c2f53502deb /src/sst.c
parent8f5673d5f4e63b158b1cd2a2aef874ac83b3662d (diff)
Add event system
Diffstat (limited to 'src/sst.c')
-rw-r--r--src/sst.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sst.c b/src/sst.c
index 4182b09..d2576f6 100644
--- a/src/sst.c
+++ b/src/sst.c
@@ -31,6 +31,7 @@
#include "engineapi.h"
#include "errmsg.h"
#include "ent.h"
+#include "event.h"
#include "fov.h"
#include "fixes.h"
#include "gameinfo.h"
@@ -473,11 +474,13 @@ DECL_VFUNC_DYN(void, ServerCommand, const char *)
DEF_CVAR(_sst_onload_echo, "EXPERIMENTAL! Don't rely on this existing!", "",
CON_HIDDEN)
+DEF_EVENT(ClientActive)
+
static void VCALLCONV ClientActive(void *this, struct edict *player) {
// XXX: it's kind of dumb that we get handed the edict here then go look it
// up again in fov.c but I can't be bothered refactoring any further now
// that this finally works, do something later lol
- if (has_fov) fov_onload();
+ EMIT_EVENT(ClientActive)
// continuing dumb portal hack. didn't even seem worth adding a feature for
if (has_vtidx_ServerCommand && con_getvarstr(_sst_onload_echo)[0]) {
@@ -530,4 +533,7 @@ EXPORT const void *CreateInterface(const char *name, int *ret) {
return 0;
}
+// no better place to put this lol
+#include <evglue.gen.h>
+
// vi: sw=4 ts=4 noet tw=80 cc=80