From 6a784e08fe87af65fa9d10912bbd5c1a27a14ba5 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 27 Dec 2021 00:48:59 +0000 Subject: Reintroduce autojump code --- src/sst.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sst.c') diff --git a/src/sst.c b/src/sst.c index d13ba5d..183a73a 100644 --- a/src/sst.c +++ b/src/sst.c @@ -17,6 +17,7 @@ #include #include +#include "autojump.h" #include "con_.h" #include "demorec.h" #include "factory.h" @@ -65,6 +66,7 @@ ifacefactory factory_client = 0, factory_server = 0, factory_engine = 0; // figures out the dependencies at build time and generates all the init glue // but we want to actually release the plugin this decade so for now I'm just // plonking ~~some bools~~ one bool here and worrying about it later. :^) +static bool has_autojump = false; static bool has_demorec = false; // HACK: later versions of L4D2 show an annoying dialog on every plugin_load. @@ -122,7 +124,7 @@ static bool do_load(ifacefactory enginef, ifacefactory serverf) { } nc: gamedata_init(); - // TODO(autojump): we'd init that here + has_autojump = autojump_init(); has_demorec = demorec_init(); fixes_apply(); @@ -164,7 +166,7 @@ e: con_colourmsg(RGBA(64, 255, 64, 255), } static void do_unload(void) { - // TODO(autojump): we'd end that here + if (has_autojump) autojump_end(); if (has_demorec) demorec_end(); #ifdef __linux__ -- cgit v1.2.3