10 Commits

Author SHA1 Message Date
Kawe Mazidjatari
6672d15d9f Bring more context to 'eDLL_T' enumerants 2022-11-10 01:21:18 +01:00
Kawe Mazidjatari
196bf4c2b3 Logging code cleanup
* Change qualifiers for some types (make const, static const, etc..).
* Renamed 'CNotifyText' to 'CTextNotify'.
* Renamed 's_LogMutex' to 'g_LogMutex' (mutex was not static).
2022-10-30 10:08:14 +01:00
Kawe Mazidjatari
3d6d6644bd Logging bug fix and error handling improvements
* Replaced the boolean 'fatal' parameter with a error code parameter, anything non-null will prompt a message (fatal) and terminate the process with given error code.
* Fixed bug where the global ostreamsink for spdlog did NOT get cleared in 'SQVM_PrintFunc' when cvar 'sq_showvmoutput' was < 3. Moved to global scope.
* Added error message for when detouring the process has failed, with the error code.
* Only call 'Plat_GetProcessUpTime()' once per log, (improves performance and fixes bug where the error message box would show a different time stamp than what is logged into the console or file).
* All TIER0 loggers only log to notify and console when the SDK engine has fully initialized and detoured all functions.
2022-09-14 00:39:38 +02:00
Kawe Mazidjatari
2010e11310 Add 'fatal' functionality to Error()
When fatal is set, the function will show a error dialogue, which will halt the process and close when the message is dismissed. Else we will end up in a crash.
2022-08-22 12:42:41 +02:00
Kawe Mazidjatari
9019e5cb70 Move LogType_t to dbg.h
Renamed to EGlobalContext_t and used globally for all context types combined into one (required for rcon messages for example, as we do native and script messages, while also retaining colors).
2022-08-17 12:28:52 +02:00
Kawe Mazidjatari
619ac76452 Implement client rcon send log request
If 'cl_rcon_request_sendlogs' is set, the netconsole will request the server to send console logs to the rcon client after successful auth.
2022-08-17 11:50:40 +02:00
Kawe Mazidjatari
3f8476db88 Logging system light refactor
* 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).
2022-08-03 18:34:44 +02:00
Kawe Mazidjatari
86c9ac5292 Upgrade mathlib to latest
Latest SourceSDK MathLib with minor modifications.
2022-07-08 00:55:01 +02:00
Kawe Mazidjatari
7d89a42b56 Mathlib implementation
SourceSDK mathlib port with light modifications.
Renamed Vector to Vector3D (to avoid confusion with std::vector (declared as vector) and Vector2D/Vector4D).
2022-07-06 21:11:32 +02:00
Kawe Mazidjatari
4b72afb74f Light refactor for logging
Moved logging functions to dbg.h (tier0) and export them from the dll.
Added additional functions for checking bad pointers (debug only!).
Reduced output code size.
2022-05-25 14:18:29 +02:00