2280 Commits

Author SHA1 Message Date
Kawe Mazidjatari
122cd89aa9 Fix recursive initialization of convars/concommands
'CSourceAppSystemGroup::PreInit' could be called multiple times. Added check for its actual stage before running any initialization code. This fixes the recursive init problem.
2023-04-01 01:10:16 +02:00
Kawe Mazidjatari
2fdcf2ce2c Reverse engineer 'CAppSystemGroup' class
Partially reverse engineered.
2023-04-01 01:07:20 +02:00
Kawe Mazidjatari
5056d8f040 Move interface types to public header 2023-04-01 01:05:43 +02:00
Kawe Mazidjatari
67180e51ff Validate client's origin name on connect
Recently, there has been a sudden influx of players playing with a name that isn't valid. Names such as "    " or "@something $very !crazy". This patch fixes this problem by enforcing checks during connect by default.
2023-03-31 22:37:53 +02:00
Kawe Mazidjatari
aa42126154 Re-enable COMDAT folding and references linker optimization flags
Re-enabled to significantly reduce binary size without affecting code generation results.
2023-03-31 20:05:10 +02:00
Kawe Mazidjatari
29616f4810 Rename 'g_vAllMaps' to 'g_InstalledMaps' 2023-03-31 00:35:01 +02:00
Kawe Mazidjatari
1a361d9961 Remove /TSAWARE compiler flag from DLL projects 2023-03-31 00:19:23 +02:00
Kawe Mazidjatari
731bdbb010 Remove explicit COMDAT/References linker optimization flags 2023-03-30 23:03:48 +02:00
Kawe Mazidjatari
6b6ead34a4 Enable TERMINAL_SERVER_AWARE PE header flag
Enabled to enforce maximum compatibility with game executable, which has this enabled as well.
2023-03-30 22:57:19 +02:00
Kawe Mazidjatari
9a8b39d71d Additional compiler option changes
Force consistency between all libraries
2023-03-30 22:47:17 +02:00
Kawe Mazidjatari
c9f51a5dab Change project compiler options
Changed to match the assembly of the game as much as possible. Will be finished when port to CMake is completed.
2023-03-30 22:21:18 +02:00
Kawe Mazidjatari
f9c5986245 Upgrade Dear ImGui to 1.89.4
Upgrade and light restructure of ImGui directory.
2023-03-29 00:19:19 +02:00
Kawe Mazidjatari
387b24875b Downgrade 'libcurl' to 7.54.0
The game uses 7.54.0, downgraded to maintain compatibility if we ever hook curl functions.
2023-03-28 23:14:26 +02:00
Kawe Mazidjatari
654d7a97e7 Remove extraneous trailing semicolon 2023-03-28 21:18:11 +02:00
Kawe Mazidjatari
47aabf244b Remove redundant tier1 files
These files are no longer necessary.
2023-03-28 01:30:09 +02:00
Kawe Mazidjatari
5a0be4a275 Fix ConVar crash
Fix crash caused by vftable error. Since we are not implementing anything, but only interfacing with the game executable, we need to rename the IConVar variant's due to name ambiguity. Re-defining them in the actual class will lead into vftable misalignment and cause a crash (or other undesired behavior) as a result.
2023-03-28 01:24:55 +02:00
Kawe Mazidjatari
2607f024b9 Move ConVar to separate implementation file
Moved to 'tier1/cvar.h/cpp'.
2023-03-28 01:05:23 +02:00
Kawe Mazidjatari
9e7fbdca54 ConVar/ConCommand class refactor and bug fixes
* Refactored ConCommandBase, ConCommand and ConVar class to make them all virtual, so it could interface with the game's implementation.
* Properly initialize members for ConCommand and ConVar instead of just calling memset.
* Fixed bug in ConVar registration function causing the virtual base table pointer to point to the ConCommand implementation instead of the ConVar implementation.
2023-03-28 00:50:08 +02:00
Kawe Mazidjatari
c86122f63e Add collision types to SDK
Merged from branch 'collision_debug'.
2023-03-27 17:42:55 +02:00
Kawe Mazidjatari
296a0df948 Add static assert for 'CClockDriftMgr' 2023-03-27 17:42:11 +02:00
Kawe Mazidjatari
df98f30c57 Rename '-ansiclr' to '-ansicolor' 2023-03-27 17:10:11 +02:00
Kawe Mazidjatari
5aea2f4261 RCON system upgrade
RCON upgrade with additional logging system improvements:
* Netconsole's can now log received messages in color, even when the RCON server has ANSI colors disabled; logs are fully composed locally.
* RCON server now also sends the log type over the wire, along with the (already existing) context.
* SDK logging code is now shared with the standalone netconsole application.
* Improved logging readability for the standalone netconsole application.
2023-03-27 02:01:48 +02:00
Kawe Mazidjatari
608f14e920 Update protobuf source files
Added new field 'messageType'; renamed 'responseID' to 'messageID', renamed 'responseBuf' to 'responseMsg'.
2023-03-27 01:37:15 +02:00
Kawe Mazidjatari
27ddc30d68 Prune ununsed/useless cvars
Also removed these from the CFG files.
* 'sq_showvmoutput' has been renamed to 'script_show_output'.
* 'sq_showvmwarning' has been renamed to 'script_show_warning'.
2023-03-26 18:18:50 +02:00
Kawe Mazidjatari
4cb8f3f019 Enable SpdLog file rotation
Enable logger rotation. Rotation takes place when log file hits the limit defined by 'SPDLOG_MAX_SIZE'.
2023-03-26 17:47:42 +02:00
Kawe Mazidjatari
24b8cc6215 Check is no longer necessary
Check is no longer necessary; shipped cvars get initialized early enough now.
2023-03-26 17:46:30 +02:00
Kawe Mazidjatari
d9926af80c Fix compiler error for project 'dedicated' 2023-03-26 17:45:34 +02:00
Kawe Mazidjatari
a60609a0e8 Initialize concommand/convar as early as possible
'CSourceAppSystemGroup::PreInit' is as early as we can initialize them; CCvar gets initialized in 'CSourceAppSystemGroup::Create'.
2023-03-26 17:45:09 +02:00
Kawe Mazidjatari
8b89c1d2b5 Init concommand/convars a bit earlier
Init in 'CEngineAPI::Init'.
2023-03-26 16:47:47 +02:00
Kawe Mazidjatari
9978227915 Lock filesystem 'read' logs behind a cvar
Locked behind cvar as loading a single map already causes 500kb 'read' logs.
2023-03-26 16:21:49 +02:00
Kawe Mazidjatari
793fcd62f2 End of logger refactor
Changed all loggers to use the internal 'CoreMsg/CoreMsgV' functions. Significantly reduced duplicate code and CPU time. Code is also much more robust.

* Code now only acquires mutex lock when the actual logging part takes place.
* Code now only checks and strip ANSI rows if its enabled to begin with.
* Code now supports setting log levels, which ultimately could be tweaked with a cvar.
* Changed logger and file names to be more readable.

TODO:
* The RCON protocol has to be modified to accommodate these changes.
2023-03-26 16:09:05 +02:00
Kawe Mazidjatari
0f76c864fd Start of logger refactor
Start of refactoring entire logging system. This refactor should remove all duplicate code across all loggers. The logic behind DevMsg, Warning and Error has now been successfully refactored into a single helper function.
2023-03-25 21:27:49 +01:00
Kawe Mazidjatari
d9a6ab5cf6 Optimize script functions
Light cleanup and optimizations for Squirrel script functions. Use existing pointers or references as much as possible in place of extraneous string copies.
2023-03-25 17:54:05 +01:00
Kawe Mazidjatari
d12ecd80d8 Default 'GetSymbolForString(CaseSensitive)' creation overload to true
Default creation overload of 'GetSymbolForString' and 'GetSymbolForStringCaseSensitive' to true.
2023-03-25 17:31:41 +01:00
Kawe Mazidjatari
0f58137167 Light symbol cleanup 2023-03-25 17:26:42 +01:00
Kawe Mazidjatari
9dd34ef53a Merge recastnavigation/recastnavigation@8e9c308afd 2023-03-25 17:17:45 +01:00
Kawe Mazidjatari
cea69d3637 Merge recastnavigation/recastnavigation@3c4a34968a 2023-03-25 17:17:12 +01:00
Kawe Mazidjatari
3649f9be5c Remove old comment
This field has been reverse engineered.
2023-03-25 17:14:04 +01:00
Kawe Mazidjatari
3be9f3dd95 Use KeyValues for ImGui panel key binds
Use KeyValues instead of JSON for ImGui panel key binds. The Server Browser 'default' key has been swapped with the 'extended' one: Default = 'VK_F10', Extended = 'VK_HOME'.
2023-03-25 17:13:16 +01:00
Kawe Mazidjatari
d2369af46e NavEditor: Move "Save" button below "Load"
Minor UX improvements.
2023-03-25 12:24:09 +01:00
Kawe Mazidjatari
59e084eafa Add ImGui include directory to project directories 2023-03-25 12:09:06 +01:00
Kawe Mazidjatari
13d9ba3e13 Save SDK Launcher state in settings file
Store the state of the SDK launcher (toggled/text options) to a file on the disk to persist state.
2023-03-24 00:10:48 +01:00
Kawe Mazidjatari
193c5bdeba Move sdk specific cfg files to different folder
Move all SDK internal CFG's to 'cfg/system'.
2023-03-24 00:04:45 +01:00
Kawe Mazidjatari
1758abb0aa Fix 'cppkore' close event bug
Fix close callback getting called recursively when application gets closed by user. The initial call originated from 'Form::WmClose', second call from 'Form::CheckCloseDialog'. The original call should set the 'called' flag, but never did.
2023-03-23 23:43:05 +01:00
Kawe Mazidjatari
b169a78542 Force consistency within code
* Use C-style format specifiers everywhere.
* Use std::string as much as possible.
* Reorder CSurface class structure by groups.
* Light optimizations in 'CSurface::ForwardCommandToGame'.
2023-03-22 00:28:41 +01:00
rexx
338d0ad3f9 fix CUtlMemory dtor crash
for some reason this caused an exception when trying to free CUtlString in the console auto-complete routine.
2023-03-21 22:43:09 +00:00
Kawe Mazidjatari
c29c2a9063 Adjust SMap path formatting
'/' is always a path separator, '\\' is implementation defined. The standard filesystem class takes care for OS regardless. Changed to standard separator.
2023-03-21 00:20:22 +01:00
Kawe Mazidjatari
f66019fbf8 Prune unused features in 'libcppkore' 2023-03-21 00:16:03 +01:00
Kawe Mazidjatari
8177707413 SDK Launcher light refactor
* Fixed bug causing command line interface not to work properly.
* Optimized warning text and instructions.
* Terminal will not be freed when compiled in Debug/Profile.
* The console will now forward the command to all game window instances.
2023-03-21 00:14:54 +01:00
Kawe Mazidjatari
a5881094db Adjust build order
Build 'libspdlog' before 'sdklauncher'.
2023-03-20 14:17:41 +01:00