Merge pull request #859 from diamante0018/develop

fix: crash when using the chat
This commit is contained in:
Edo 2023-02-12 18:49:23 +00:00 committed by GitHub
commit 4d5cc638af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,7 +186,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;