16 Commits

Author SHA1 Message Date
Kawe Mazidjatari
8b0bdae883 NetCon: fix command line parsing bug
-ansicolor is the only possible command line parameter, if its passed we need to shift the indices for the next one if user provided address and key.
2025-02-09 00:45:46 +01:00
Kawe Mazidjatari
c8ee0d4333 Core: improve logger performance
- Drop the need for the ImGui logger sink, we can just use the buffer we already rendered into for the terminal sink.
- Remove ANSI rows inserted by the logger before file logging using offsets and ranges to significantly improve the performance.
- For ANSI row constants, use std::string so appending can use the precomputed string length instead of running strlen() each time internally.
2025-02-02 14:47:57 +01:00
Kawe Mazidjatari
9113b36bfd Core: fix typo's in function comment headers
Small typo's, fixed to retain consistency.
2024-09-04 01:09:09 +02:00
Kawe Mazidjatari
77b6c2256e NetCon: use CThreadMutex instead 2024-08-03 11:11:57 +02:00
Kawe Mazidjatari
358a2c4bf0 Engine: improve naming convention for RCON
Make it more consistent with the rest of the SDK. Nothing logic wise has been changed in this patch.
2024-06-17 15:24:08 +02:00
Kawe Mazidjatari
266dc56b36 NetCon: rename to 'netcon'; remove platform suffix
Netcon is no longer 32bits. Previously it was made 32bits to maximize system compatibility, but this was unfortunately too hard to maintain after the migration to CMake, it was also no longer worth it as the tool never got used on 32bit platforms. Renamed to avoid confusion.
2024-04-21 01:54:58 +02:00
Kawe Mazidjatari
a1d48efec6 NetConsole: log header/version as soon as possible
Logged right after console and terminal is initialized.
2024-04-17 20:52:06 +02:00
Kawe Mazidjatari
f059202ff2 NetConsole: fix command line bug
Recently, encryption was implemented in the RCON system, but the command line initialization code wasn't adapted to this new logic. Code has now been adapted.
2024-04-16 16:51:51 +02:00
Kawe Mazidjatari
f8dd1fe88c Engine: implement encryption for RCON protocol
RCON lacked encryption, added AES-CTR encryption on RCON frames. Slightly adjusted protocol to take this into account (sending nonces, encrypted data itself, etc).
2024-04-10 14:08:52 +02:00
Kawe Mazidjatari
77f748c5d3 NetConsole: fix undefined symbol
CheckCPUforSSE2() was removed in commit 504d042e6095b24e125c7d38549db860b2d15a67, but NetConsole still needs to check for it.
2024-04-05 19:37:00 +02:00
Kawe Mazidjatari
6e23c39d40 Netconsole: fix race condition caused by misplaced mutex
Mutex should be locked before IsConnected(), as IsConnected() accesses CSocketCreator which checks a vector (not thread safe), lock the mutex in the correct place.
2024-02-22 02:00:09 +01:00
Kawe Mazidjatari
884e1c5014 Netconsole: don't process empty input strings
Caught by assert in CUtlBuffer ctor when tokenizing the input.
2024-01-14 11:48:42 +01:00
Kawe Mazidjatari
1b0cc4d188 Netconsole: refactor & improvements
* Fix multiple issues related to threading, such as not locking the mutex when using thread-unsafe members or methods.
* Netconsole now logs its output to a file on the disk.
* Properly handle close events, to allow netconsole to shutdown properly, so stuff like log buffers could flush properly. Input is now ran in a separate thread so main thread could check if we need to shutdown, and do so if needed. This was needed as previously input was ran in the main thread and the issue is that its blocking until an input is given.
2024-01-14 11:31:16 +01:00
Kawe Mazidjatari
05a84339ce Tools: check CPU for SSE2
SSE and SSE2 instructions are being used, check for them instead of crashing somewhere in the program.
2024-01-12 15:49:22 +01:00
Kawe Mazidjatari
078c241a0d Tools: rename NETCONSOLE define to _TOOLS
Rename since this would actually be used for all tools. Also moved 'plat_time.cpp' to tier0 so anything could compile it.
2024-01-12 00:25:19 +01:00
Kawe Mazidjatari
fd3e227a86 Align folder structure with p4 2023-09-19 22:13:22 +02:00