Skip to content

Commit

Permalink
Revert "Remove say notifies (added by pluto)"
Browse files Browse the repository at this point in the history
This reverts commit c61da58.
  • Loading branch information
alicealys committed Jan 23, 2022
1 parent 60d5853 commit 171c9ba
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/component/notifies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,21 @@ namespace notifies
std::string message = game::ConcatArgs(1);
message.erase(0, 1);

scheduler::once([hidden, _cmd, message, clientNum]()
{
const auto teamchat = _cmd == "say_team"s;
const scripting::entity level{*game::levelEntityId};
const auto _player = scripting::call("getEntByNum", {clientNum});

if (_player.get_raw().type == game::SCRIPT_OBJECT)
{
const auto player = _player.as<scripting::entity>();

scripting::notify(level, "say", {player, message, teamchat});
scripting::notify(player, "say", {message, teamchat});
}
});

for (const auto& callback : player_say_callbacks)
{
const auto _player = scripting::call("getEntByNum", {clientNum}).as<scripting::entity>();
Expand Down

0 comments on commit 171c9ba

Please sign in to comment.