From 9f5ef34087c7029ec87014af3b7f11dcb184389f Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Mon, 14 Nov 2016 03:09:30 -0600 Subject: [PATCH] Fix sending messages to locally connected spectators --- natives.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/natives.cpp b/natives.cpp index 7293687..314eac3 100644 --- a/natives.cpp +++ b/natives.cpp @@ -250,11 +250,12 @@ static bool BroadcastEventLocal(IHLTVServer *server, IGameEvent *event, bool bRe { unsigned char vstk[sizeof(void *) + sizeof(IGameEvent *) + sizeof(bool)]; unsigned char *vptr = vstk; - - *(void **)vptr = (void *)server; + + IServer *iserver = server->GetBaseServer(); + *(void **)vptr = (void *)((intptr_t)iserver - 8); vptr += sizeof(void *); *(IGameEvent **)vptr = event; - vptr += sizeof(char *); + vptr += sizeof(IGameEvent *); *(bool *)vptr = bReliable; pBroadcastEventLocal->Execute(vstk, NULL);