18 Commits

Author SHA1 Message Date
Amos
8202c8fc6c Small improvement 2022-03-16 01:38:00 +01:00
Amos
2fee28ae96 Adapt to new loggers 2022-03-04 15:59:33 +01:00
Amos
6e4a4bde2f Implement SQVM error rebuild in engine with new Warning and Error loggers 2022-03-04 15:34:09 +01:00
Amos
1058a6fa10 Use unicode character set instead and light cleanup/bug fixes 2022-03-04 12:22:17 +01:00
Amos
0509fb0358 Cleanup all redundant empty control statements 2022-02-28 01:05:55 +01:00
Amos
62604e8fe9 CAI related stuff (see description)
* Partially rebuild CGlobalVarsBase and CGlobalVars struct.
* Partially implement BuildAINFile (disk builder) written by BobTheBob9. All that needs to be found are the addresses/offsets for 'pUnkStruct0Count' and 'pUnkLinkStruct1Count' (see ai_node.h). I didn't have time for it yet.
* Patch call which restarts the engine once AIN file has been build (so it doesn't get cleared from memory).
* Temporarily patch write operation in 'Detours_LevelInit()' which writes out of scope since the navmesh structure is misaligned somewhere still with a few bytes.

NOTE: 'CAI_NetworkBuilder::BuildFile()' is for now commented out until the 2 other structs are found in the game dll. Once found then we could start fixing the struct offsets and hope it works as-is.
2022-02-27 03:15:00 +01:00
Amos
8079e0ed4c Heavy cleanup for CHostState methods and signatures
* Add Cbuf_AddText and Cbuf_Execute signatures.
* Remove additional VGui stuff from dedicated statemachine.
* Move signatures to their respective headers.
* De-inline 'CHostState::FrameUpdate()'
* Ported al new patters to GAMEDLL_S1, CEngine still recreation needs extra work
2022-02-19 02:31:16 +01:00
Amos
f488b7e75e Load 'server' VPK's instead if the dedicated server is a standalone dedicated server
* Load server VPK's instead of client VPK's on standalone servers
* Dynamically search for 'g_bDedicated' global boolean instead of hardcoded address
* Add 'PatchString' to memory class
2022-01-26 23:45:58 +01:00
Amos
3f50736e48 Light cleanup 2022-01-22 15:42:35 +01:00
Amos
03e700bac1 Move 'PrintLastError()' to utility.cpp 2022-01-19 23:14:50 +01:00
Amos
998de21d73 Implement new FileSystem hooks
The hooks will check if the file in question exist on the disk first before falling back to VPK or obtaining it from the cache.
2022-01-19 19:03:11 +01:00
Amos
b9af86b9c1 Implement terminal utilities for Windows console + add new colors for various output variations
* Add new SDK launch logo.
* Remove ansi-color coding from in-game console and file loggers.
* Improve console colors for Windows.
* Implement various string utilities.
* Implement various terminal utilities.
2022-01-16 01:33:07 +01:00
Amos
1c5df4e178 Ansi terminal color support + big optimizations on all log systems + 'Warning()' hook
* Ansi colors can now be enabled with the '-ansiclr- flag.
* All loggers have been optimized and are all initialized only once at process startup.
* New hook for 'Warning()' print function with warning level.
2022-01-14 20:48:16 +01:00
IcePixelx
ae09372cc7 Pylon system changes. 2022-01-09 14:35:43 +01:00
Amos
84e7729ca0 Add client and debug utilities + cleanup 2022-01-04 11:56:31 +01:00
IcePixelx
c81aca28de Fixed a few asserts regarding the gui. RPak things. Check description.
* Fixed assert on ImGui on IBrowser because ImGui::Begin wasn't followed up by ImGui::End
* FileExists got modernized. Using std library instead of Windows native functions now.
* RTech::DecompressedSize is actually readable now thanks to steyk.
* Same goes for RTech::Decompress
* rtech_decompress prints the decompressed file CRC32 now and writes the file all at once.
* Fixed ImGui assert on spamming SetupImGui();
2021-12-26 02:30:20 +01:00
Amos
2f30ce4a4c Move banlist.config back to root dir due to its importance 2021-12-25 22:49:09 +01:00
Amos
d5b2e58dae Code base refactor + major performance and readability improvement. Read description for details.
* Codebase restructured to SourceSDK codebase style and .cpp/.h assertion paths in the game executable.
* Document most functions with valve style 'Purpose' blocks.
* Rename variables to match the rest of the codebase and Valve's naming convention.
* Dedicated DLL and the SDKLauncher now share the same codebase as the DevSDK.

* Obtain globals or pointers directly instead of waiting for runtime initialized data.
* Dynamically search for all functions and globals (this doesn't count for dedicated yet!).
* Initialize most in-SDK variables.

* Move certain prints and other utilities under ConVars to reduce verbosity and increase performance.
* Print all pattern scan results through a virtual function to make it easier to add and debug new patterns in the future.
* Type global var pointers appropriately if class or type is known and implemented.
* Forward declare 'CClient' class to avoid having 2 'g_pClient' copies.
* Add IDA's pseudo definitions for easier prototyping with decompiled assembly code.

* RPAK decompress Command callback implementation.
* Load decompressed RPaks from 'paks\Win32\' overriding the ones in 'paks\Win64\' (the decompress callback will automatically fix the header and write it to 'paks\Win32\').

* VPK decompress Command callback implementation.
* Move CRC32 ands Adler32 to implementation files.

* Server will print out more details about the connecting client.

* Upgrade ImGui lib to v1.86.
* Don't compile id3dx.h for dedicated.
* Don't compile id3dx.cpp for dedicated
* Implement DevMsg print function allowing to print information to the in-game VGUI/RUI console overlay, ImGui console overlay and the external windows console

* Fixed bug where the Error function would not properly terminate the process when an error is called. This caused access violations for critical/non-recoverable errors.
* Fixed bug where the game would crash if the console or server browser was enabled while the game was still starting up.
* Several bug fixes for the dedicated server (warning: dedicated is still considered work-in-progress!).
2021-12-25 22:36:38 +01:00