Finish logprint code in gsc (#516)

This commit is contained in:
Edo 2022-11-02 14:12:02 +00:00 committed by GitHub
parent 15c31e6cec
commit 712a69a452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5898 additions and 1 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -54,7 +54,7 @@ namespace game_log
va_list ap;
va_start(ap, fmt);
vsprintf_s(buffer, fmt, ap);
vsnprintf_s(buffer, _TRUNCATE, fmt, ap);
va_end(ap);

View File

@ -10,6 +10,7 @@
#include "scheduler.hpp"
#include "notifies.hpp"
#include "scripting.hpp"
#include "game_log.hpp"
#include <utils/hook.hpp>
@ -193,6 +194,15 @@ namespace notifies
scripting::notify(level, params[0], {player, message});
scripting::notify(player, params[0], {message});
game_log::g_log_printf("%s;%s;%i;%s;%s\n",
params[0],
player.call("getguid").as<const char*>(),
player.call("getentitynumber").as<int>(),
player.get("name").as<const char*>(),
message.data()
);
}, scheduler::pipeline::server);
if (hidden)