fix: crash when using the chat

This commit is contained in:
FutureRave 2023-02-12 18:38:20 +00:00
parent 7aa0e513c7
commit 54bc09d28c
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31

View File

@ -190,7 +190,7 @@ namespace notifies
scheduler::once([params, message, msg_index, client_num]
{
const scripting::entity level{*game::levelEntityId};
const auto player = scripting::call("getEntByNum", {client_num}).as<scripting::entity>();
const auto player = scripting::call("getentbynum", {client_num}).as<scripting::entity>();
// Remove \x1F before sending the notify only if present
const auto notify_msg = msg_index ? message.substr(1) : message;