From 5e921bf59373d79d27c322ff86e8b5a37b151e45 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 31 Jul 2022 16:02:10 +0100 Subject: Add magical feature codegen system, at long last --- src/ent.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ent.c') diff --git a/src/ent.c b/src/ent.c index 392fceb..9d69bf0 100644 --- a/src/ent.c +++ b/src/ent.c @@ -18,12 +18,15 @@ #include "engineapi.h" #include "errmsg.h" +#include "feature.h" #include "gamedata.h" #include "gametype.h" #include "intdefs.h" #include "mem.h" #include "vcall.h" +FEATURE() + DECL_VFUNC_DYN(void *, PEntityOfEntIndex, int) static struct edict **edicts = 0; @@ -44,7 +47,7 @@ void *ent_get(int idx) { return e->ent_unknown; } -bool ent_init(void) { +INIT { // for PEntityOfEntIndex we don't really have to do any more init, we // can just call the function later. if (has_vtidx_PEntityOfEntIndex) return true; -- cgit v1.2.3