[Dedicated] Implement event for chat
This commit is contained in:
parent
81608fb782
commit
8dfbe47bc6
@ -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;
|
Dedicated::SendChat = true;
|
||||||
|
|
||||||
@ -85,6 +85,10 @@ namespace Components
|
|||||||
++text;
|
++text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Game::Scr_AddEntity(player);
|
||||||
|
Game::Scr_AddString(text + 1);
|
||||||
|
Game::Scr_NotifyLevel(Game::SL_GetString("say", 0), 2);
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,9 +101,10 @@ namespace Components
|
|||||||
push eax
|
push eax
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
|
push[esp + 100h + 28h]
|
||||||
push eax
|
push eax
|
||||||
call Dedicated::EvaluateSay
|
call Dedicated::EvaluateSay
|
||||||
add esp, 4h
|
add esp, 8h
|
||||||
|
|
||||||
mov [esp + 20h], eax
|
mov [esp + 20h], eax
|
||||||
popad
|
popad
|
||||||
|
@ -23,7 +23,7 @@ namespace Components
|
|||||||
static void PostInitialization();
|
static void PostInitialization();
|
||||||
static void PostInitializationStub();
|
static void PostInitializationStub();
|
||||||
|
|
||||||
static const char* EvaluateSay(char* text);
|
static const char* EvaluateSay(char* text, Game::gentity_t* player);
|
||||||
|
|
||||||
static void PreSayStub();
|
static void PreSayStub();
|
||||||
static void PostSayStub();
|
static void PostSayStub();
|
||||||
|
@ -223,11 +223,13 @@ namespace Game
|
|||||||
Scr_ExecThread_t Scr_ExecThread = Scr_ExecThread_t(0x4AD0B0);
|
Scr_ExecThread_t Scr_ExecThread = Scr_ExecThread_t(0x4AD0B0);
|
||||||
Scr_FreeThread_t Scr_FreeThread = Scr_FreeThread_t(0x4BD320);
|
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_AddString_t Scr_AddString = Scr_AddString_t(0x412310);
|
||||||
Scr_AddInt_t Scr_AddInt = Scr_AddInt_t(0x41D7D0);
|
Scr_AddInt_t Scr_AddInt = Scr_AddInt_t(0x41D7D0);
|
||||||
Scr_AddFloat_t Scr_AddFloat = Scr_AddFloat_t(0x61E860);
|
Scr_AddFloat_t Scr_AddFloat = Scr_AddFloat_t(0x61E860);
|
||||||
Scr_AddObject_t Scr_AddObject = Scr_AddObject_t(0x430F40);
|
Scr_AddObject_t Scr_AddObject = Scr_AddObject_t(0x430F40);
|
||||||
Scr_Notify_t Scr_Notify = Scr_Notify_t(0x4A4750);
|
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);
|
Scr_ClearOutParams_t Scr_ClearOutParams = Scr_ClearOutParams_t(0x4386E0);
|
||||||
|
|
||||||
|
@ -523,6 +523,9 @@ namespace Game
|
|||||||
typedef void(__cdecl * RemoveRefToObject_t)(unsigned int id);
|
typedef void(__cdecl * RemoveRefToObject_t)(unsigned int id);
|
||||||
extern RemoveRefToObject_t RemoveRefToObject;
|
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);
|
typedef void(__cdecl * Scr_AddString_t)(const char* str);
|
||||||
extern Scr_AddString_t Scr_AddString;
|
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);
|
typedef void(__cdecl * Scr_Notify_t)(gentity_t *ent, unsigned __int16 stringValue, unsigned int paramcount);
|
||||||
extern Scr_Notify_t Scr_Notify;
|
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)();
|
typedef void(__cdecl * Scr_ClearOutParams_t)();
|
||||||
extern Scr_ClearOutParams_t Scr_ClearOutParams;
|
extern Scr_ClearOutParams_t Scr_ClearOutParams;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user