mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* Use responceid from server to determine in which context to log. * Moved all script loggers from combined enums to minus instead (SERVER = -3, CLIENT = -2, UI = -1 SERVER_CODE = 0, etc), this makes it much easier to align stuff in combined systems such as the RUI logger or NetMsg(). * Color log networked RCON messages properly on the client. * Added dedicated logger for all received RCON messages (net_console.log). * Log commands submitted through in-game console (allows for easier debugging when going through log files).
29 lines
873 B
C++
29 lines
873 B
C++
#include "core/stdafx.h"
|
|
#include "engine/sys_dll.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Sys_Error_Internal
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
int HSys_Error_Internal(char* fmt, va_list args)
|
|
{
|
|
char buffer[2048]{};
|
|
Error(eDLL_T::COMMON, "_______________________________________________________________\n");
|
|
Error(eDLL_T::COMMON, "] ENGINE ERROR ################################################\n");
|
|
vsprintf(buffer, fmt, args);
|
|
Error(eDLL_T::COMMON, "%s\n", buffer);
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
return Sys_Error_Internal(fmt, args);
|
|
}
|
|
|
|
void SysDll_Attach()
|
|
{
|
|
DetourAttach((LPVOID*)&Sys_Error_Internal, &HSys_Error_Internal);
|
|
}
|
|
|
|
void SysDll_Detach()
|
|
{
|
|
DetourDetach((LPVOID*)&Sys_Error_Internal, &HSys_Error_Internal);
|
|
}
|