summaryrefslogtreecommitdiffhomepage
path: root/src/fov.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/fov.c
parent8f5673d5f4e63b158b1cd2a2aef874ac83b3662d (diff)
Add event system
Diffstat (limited to 'src/fov.c')
-rw-r--r--src/fov.c4
1 files changed, 3 insertions, 1 deletions
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));