From c8d7588251fd4fe63ac6afe2a90ca7066c786609 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 23 Jul 2022 23:47:26 +0100 Subject: Add event system --- src/fov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/fov.c') diff --git a/src/fov.c b/src/fov.c index c090651..4ea9b2d 100644 --- a/src/fov.c +++ b/src/fov.c @@ -23,10 +23,12 @@ #include "engineapi.h" #include "errmsg.h" #include "ent.h" +#include "event.h" #include "gametype.h" #include "hook.h" #include "intdefs.h" #include "mem.h" +#include "sst.h" #include "vcall.h" #include "x86.h" @@ -74,7 +76,7 @@ static void fovcb(struct con_var *v) { } // called by sst.c in ClientActive to ensure fov is applied on load -void fov_onload(void) { +HANDLE_EVENT(ClientActive) { if (real_fov_desired == fov_desired) { void *player = ent_get(1); // " if (player) orig_SetDefaultFOV(player, con_getvari(fov_desired)); -- cgit v1.2.3