From ec9a2ad7fa164df4c496a295d5f41e7161b3ac94 Mon Sep 17 00:00:00 2001 From: Federico Cecchetto Date: Fri, 18 Jun 2021 22:26:18 +0200 Subject: [PATCH] Also notify say_team --- src/component/notifies.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/component/notifies.cpp b/src/component/notifies.cpp index d88b680..75686df 100644 --- a/src/component/notifies.cpp +++ b/src/component/notifies.cpp @@ -4,7 +4,6 @@ #include "game/scripting/entity.hpp" #include "game/scripting/execution.hpp" -#include "notifies.hpp" namespace notifies { @@ -12,16 +11,13 @@ namespace notifies { utils::hook::detour client_command_hook; - utils::hook::detour scr_player_killed_hook; - utils::hook::detour scr_player_damage_hook; - void client_command_stub(int clientNum) { char cmd[1024] = { 0 }; game::SV_Cmd_ArgvBuffer(0, cmd, 1024); - if (cmd == "say"s) + if (cmd == "say"s || cmd == "say_team"s) { std::string message = game::ConcatArgs(1); message.erase(0, 1); @@ -29,8 +25,8 @@ namespace notifies const scripting::entity level{*game::levelEntityId}; const auto player = scripting::call("getEntByNum", {clientNum}).as(); - scripting::notify(level, "say", {player, message}); - scripting::notify(player, "say", {message}); + scripting::notify(level, cmd, {player, message}); + scripting::notify(player, cmd, {message}); } return client_command_hook.invoke(clientNum);