diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index ee9bed44..2a2ef1f2 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -74,7 +74,7 @@ namespace Components } } - const char* Dedicated::EvaluateSay(char* text) + const char* Dedicated::EvaluateSay(char* text, Game::gentity_t* player) { Dedicated::SendChat = true; @@ -85,6 +85,10 @@ namespace Components ++text; } + Game::Scr_AddEntity(player); + Game::Scr_AddString(text + 1); + Game::Scr_NotifyLevel(Game::SL_GetString("say", 0), 2); + return text; } @@ -97,9 +101,10 @@ namespace Components push eax pushad + push[esp + 100h + 28h] push eax call Dedicated::EvaluateSay - add esp, 4h + add esp, 8h mov [esp + 20h], eax popad diff --git a/src/Components/Modules/Dedicated.hpp b/src/Components/Modules/Dedicated.hpp index c8fb5e07..002d28bb 100644 --- a/src/Components/Modules/Dedicated.hpp +++ b/src/Components/Modules/Dedicated.hpp @@ -23,7 +23,7 @@ namespace Components static void PostInitialization(); static void PostInitializationStub(); - static const char* EvaluateSay(char* text); + static const char* EvaluateSay(char* text, Game::gentity_t* player); static void PreSayStub(); static void PostSayStub(); diff --git a/src/Game/Functions.cpp b/src/Game/Functions.cpp index 490ae2e8..8a40417d 100644 --- a/src/Game/Functions.cpp +++ b/src/Game/Functions.cpp @@ -223,11 +223,13 @@ namespace Game Scr_ExecThread_t Scr_ExecThread = Scr_ExecThread_t(0x4AD0B0); Scr_FreeThread_t Scr_FreeThread = Scr_FreeThread_t(0x4BD320); + Scr_AddEntity_t Scr_AddEntity = Scr_AddEntity_t(0x4BFB40); Scr_AddString_t Scr_AddString = Scr_AddString_t(0x412310); Scr_AddInt_t Scr_AddInt = Scr_AddInt_t(0x41D7D0); Scr_AddFloat_t Scr_AddFloat = Scr_AddFloat_t(0x61E860); Scr_AddObject_t Scr_AddObject = Scr_AddObject_t(0x430F40); Scr_Notify_t Scr_Notify = Scr_Notify_t(0x4A4750); + Scr_NotifyLevel_t Scr_NotifyLevel = Scr_NotifyLevel_t(0x4D9C30); Scr_ClearOutParams_t Scr_ClearOutParams = Scr_ClearOutParams_t(0x4386E0); diff --git a/src/Game/Functions.hpp b/src/Game/Functions.hpp index 345664a3..a0e0c7bc 100644 --- a/src/Game/Functions.hpp +++ b/src/Game/Functions.hpp @@ -523,6 +523,9 @@ namespace Game typedef void(__cdecl * RemoveRefToObject_t)(unsigned int id); extern RemoveRefToObject_t RemoveRefToObject; + typedef void(__cdecl * Scr_AddEntity_t)(gentity_s const*); + extern Scr_AddEntity_t Scr_AddEntity; + typedef void(__cdecl * Scr_AddString_t)(const char* str); extern Scr_AddString_t Scr_AddString; @@ -571,6 +574,9 @@ namespace Game typedef void(__cdecl * Scr_Notify_t)(gentity_t *ent, unsigned __int16 stringValue, unsigned int paramcount); extern Scr_Notify_t Scr_Notify; + typedef void(__cdecl * Scr_NotifyLevel_t)(unsigned __int16 stringValue, unsigned int paramcount); + extern Scr_NotifyLevel_t Scr_NotifyLevel; + typedef void(__cdecl * Scr_ClearOutParams_t)(); extern Scr_ClearOutParams_t Scr_ClearOutParams;