diff options
author | 2025-04-17 01:39:10 +0100 | |
---|---|---|
committer | 2025-04-17 20:02:18 +0100 | |
commit | 8a669bc96ffdb9d0f6f54e464da11e3375c80a55 (patch) | |
tree | 569dac0cd082ad25e779a69f0bcceff5ca212bb1 /src/clientcon.c | |
parent | 0b40d4d9ea1cbfbb92795e0d6f26cf108f2dec5f (diff) | |
download | sst-8a669bc96ffdb9d0f6f54e464da11e3375c80a55.tar.gz sst-8a669bc96ffdb9d0f6f54e464da11e3375c80a55.zip |
Add type-safety to virtual calls and accessors
This probably should have been the design from the start.
It's still possible to use void pointers, and this is done in a couple
of places for simplicity, but wherever possible, we have actual structs
for things now.
Additionally, in places where vtables are fiddled with, e.g. vtable
hooks, we have actual struct definitions with vtable pointers so there's
need for pointer-casting horror.
Diffstat (limited to 'src/clientcon.c')
-rw-r--r-- | src/clientcon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clientcon.c b/src/clientcon.c index 78c8957..767a4cd 100644 --- a/src/clientcon.c +++ b/src/clientcon.c @@ -25,7 +25,8 @@ REQUIRE(ent) REQUIRE_GAMEDATA(vtidx_ClientPrintf) REQUIRE_GLOBAL(engserver) -DECL_VFUNC_DYN(void, ClientPrintf, struct edict *, const char *) +DECL_VFUNC_DYN(struct VEngineServer, void, ClientPrintf, struct edict *, + const char *) void clientcon_msg(struct edict *e, const char *s) { ClientPrintf(engserver, e, s); |