maint(chat): use default game's behaviour
This commit is contained in:
parent
a365878d87
commit
ed72e4f6b8
@ -8,24 +8,22 @@
|
|||||||
|
|
||||||
static void notify_on_say(game::native::gentity_s* ent, int mode, const char* message)
|
static void notify_on_say(game::native::gentity_s* ent, int mode, const char* message)
|
||||||
{
|
{
|
||||||
const auto ent_num = ent->s.number;
|
|
||||||
|
|
||||||
game::native::Scr_AddString(message + 1); // First character has nothing to do with actual message
|
game::native::Scr_AddString(message + 1); // First character has nothing to do with actual message
|
||||||
game::native::Scr_AddInt(mode);
|
game::native::Scr_AddInt(mode);
|
||||||
game::native::Scr_AddEntityNum(ent_num, 0);
|
game::native::Scr_AddEntityNum(ent - game::native::g_entities, 0);
|
||||||
|
|
||||||
game::native::Scr_NotifyLevel(game::native::SL_GetString("say", 0), 3);
|
game::native::Scr_NotifyLevel(game::native::SL_GetString("say", 0), 3);
|
||||||
|
|
||||||
const auto* guid = game::native::mp::SV_GetGuid(ent_num);
|
const auto* guid = game::native::mp::SV_GetGuid(ent - game::native::g_entities);
|
||||||
const auto* name = game::native::mp::svs_clients[ent_num].name;
|
const auto* name = game::native::mp::svs_clients[ent - game::native::g_entities].name;
|
||||||
|
|
||||||
if (mode == 0)
|
if (mode == 0)
|
||||||
{
|
{
|
||||||
game_log::g_log_printf("say;%s;%d;%s;%s\n", guid, ent_num, name, message + 1);
|
game_log::g_log_printf("say;%s;%d;%s;%s\n", guid, ent - game::native::g_entities, name, message);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
game_log::g_log_printf("sayteam;%s;%d;%s;%s\n", guid, ent_num, name, message + 1);
|
game_log::g_log_printf("sayteam;%s;%d;%s;%s\n", guid, ent - game::native::g_entities, name, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user