175 Commits

Author SHA1 Message Date
IcePixelx
899bde2af0 Add comments. 2021-12-27 21:30:04 +01:00
IcePixelx
f5208d2b61 Fixed NET::ShutDown recursive calling, fixed decompressed patch header size on decompress. 2021-12-27 20:44:37 +01:00
Amos
e03d74b753 Rename RTech decompression methods 2021-12-27 16:58:07 +01:00
Amos
69161ae6c0 Implement RTech_AsyncLoad hook and concommand
The ConCommand 'rtech_asyncload' allows the user to load specific pak files on-demand.
2021-12-27 16:53:35 +01:00
IcePixelx
54e07952e1 Fixed compilation. 2021-12-27 14:17:34 +01:00
Amos
947049b7e6 Add RPak async load pattern 2021-12-27 03:27:22 +01:00
Amos
0107656b1b Dedicated server inaccessible memory fix
The approach could likely be performed better, however this is a multithreaded operation and isn't very easy to debug. So far this allowed the server to start and change to every level. The root cause has to be identified when the server is stable
2021-12-27 03:15:25 +01:00
Amos
a87eee1818 Fix bug where FCVAR_CHEATS gets stripped regardless of intention 2021-12-27 02:23:03 +01:00
Amos
77c2be57ec Fix crash when setting persistence var in CClient struct 2021-12-27 02:06:03 +01:00
IcePixelx
c7987f8f6b Abit of Vector3 class. 2021-12-26 23:58:06 +01:00
IcePixelx
15bfffdd0f Fixed typo. Properly mask off cheats and dev from concommands and convars. 2021-12-26 22:58:28 +01:00
IcePixelx
c90d3184ea Aligning. 2021-12-26 04:14:28 +01:00
IcePixelx
0ca5b5ae35 Fixed potential crash with _NET_SetKey_f_CompletionFunc. 2021-12-26 02:37:56 +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
IcePixelx
8cfc55289b Git client decided not to commit this. 2021-12-25 22:58:51 +01:00
IcePixelx
8ed86febff fixed file typo. 2021-12-25 22:54:32 +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
IcePixelx
262365b733 origin sdk, throw error if originsdk failed. 2021-12-15 15:58:50 +01:00
IcePixelx
f34b4bbeea Rebuild CHostState::FrameUpdate fully works now. 2021-11-05 21:25:25 +01:00
IcePixelx
15078652e1 Create class instances earlier. 2021-11-05 00:57:52 +01:00
IcePixelx
e92453db37 Some fixes. 2021-11-05 00:09:49 +01:00
IcePixelx
ab12789faf Log system adjustments. 2021-10-20 18:49:48 +02:00
r-ex
7f86722116
changed paint hook for logsystem and fixed some issue (#58)
* changed paint hook

* Update gameclasses.cpp

* fixed vector issue with logsystem (i think)
2021-10-20 18:04:21 +02:00
IcePixelx
cb3aaa7640 Clean up. 2021-10-20 18:03:02 +02:00
rexx
6c65dd0fcd why 2021-10-05 22:10:08 +01:00
rexx
c356dd403c Update hooks.h 2021-10-05 22:01:28 +01:00
rexx
3d770e087d convar for logger overlay, some colour changes 2021-10-05 21:59:27 +01:00
rexx
65ab3770e5 Update patterns.h 2021-10-05 20:56:52 +01:00
rexx
ea336277bd base logsystem 2021-10-05 20:56:31 +01:00
IcePixelx
341bd875e7 Fixed some debug prints. 2021-10-05 00:34:50 +02:00
IcePixelx
ef8b20f513 Removed LockCursor static address when removing the hook. 2021-10-05 00:28:14 +02:00
IcePixelx
17d45a02aa Read description for changes.
* Completely re-wrote the DirectX creation and hooks.
* Using spdlog mostly everywhere now.
* Added prints for when compiled in debug.
* Using LockCursor now to prevent input to the game while in the gui.
* Patched the game to call CMatSystemSurface::LockCursor instead of it calling the inlined version.
* Added rebuild CHostState::FrameUpdate (Not finished yet)
* Added option to print to command prompt again.
* Added log Auto-Clear.
* Added scan for NetChan Encryption Key Pointer.
* Added more error handling when loading gui config.
2021-10-05 00:25:58 +02:00
rexx
6236a6402d server script functions 2021-09-20 21:06:23 +01:00
Александр Герман
d08387d9ba
static link debug (#53) 2021-09-16 12:42:05 +02:00
r-ex
25c5a5c9af
custom native ui & client script functions (#52)
* custom native ui & client script functions

* spacing is hard

* sq_pushbool, sq_pushstring, sq_getstring, sq_getinteger

* sq_pushinteger, sq_newarray, sq_arrayappend, sq_newtable, sq_newslot

* Re-factored code.

Co-authored-by: IcePixelx <41352111+PixieCore@users.noreply.github.com>
2021-09-14 17:25:22 +02:00
Amos
b42e85b1f4 First work-in-progress dedicated implementation
Based on MrSteyk's dedicated patch.
Additional patches targets the disabling of the client.dll library and VGUI. The disabling of the client.dll library initialization caused several issues to be investigated still (currently loops fine in _Host_RunFrame()). but executing a map command currently makes it only load the mp_common VPK before getting stuck somewhere. Setting hoststate to a valid map with HS_NEW_GAME (manually) does something to the engine but does not force the server to load anything yet.

Added enums and classes from r5dev project.
2021-09-12 16:41:30 -07:00
IcePixelx
2da6d71fb3 Alot of changes read description
* Ban list added
* Playlist parser added
* Kick functions added
* Connect uses encryption keys now
* Fixed restricted server commands
2021-09-08 00:32:03 +02:00
IcePixelx
c89c7c9c6b Removed native console logging, logging to file and imgui console now. 2021-08-30 17:52:10 +02:00
IcePixelx
9adbbcdae6 Reverted till i find a proper fix. 2021-08-23 23:07:03 +02:00
IcePixelx
dc635415aa Fixed crash when starting server. 2021-08-23 22:49:47 +02:00
IcePixelx
880adbf800 Fixed bug with custom maps. 2021-08-21 00:24:34 +02:00
IcePixelx
8496ccc417 Read description for changes!
* Parsing playlist from keyvalues now.
* When hosting a server it will ask for a playlist to be chosen.
* Load playlist on demand into memory.
* Load playlist from disk.
* Added LoadPlaylist hook to clear the MapVPKCache that causes crashes with launchplaylist concommand
* KeyValues class is useable now.
2021-08-20 23:40:44 +02:00
PixieCore
7bb4fd6313
Merge indev into master. (#44)
* Added separate function to resolve relative addresses in address.h

* Added new patterns to the print function.

* Updated IsFlagSet hooks.

* Cleaned up code to properly mask off Dev and Cheat flags.
* Added separate define from _DEBUG so you can define it in release builds for people without C++ Debug Restributeables.

* Removed un-used define in hooks.h

* Fixed potential crashes in r5net and added debug prints.

* Potential crashes were when in certain post functions the returned status wasn't 200.

* Changed map-select drop down menu, now it displays 'Map Name + Season' instead of file-name. (#41)

* Host Server shows normal map names

* Changed a few stuff...

* redid some stuff that isn't crucial

* Update CCompanion.cpp

* Update CCompanion.cpp

* Updated mapname displaying.

* Moved "ServerMap" as a static object into CCompanion::HostServerSection().

Co-authored-by: IcePixelx <41352111+PixieCore@users.noreply.github.com>

* prevent squirrel compiler errors from killing game process (#43)

* Read description for all changes.

* Added ability to register custom ConVar.
* Added 2 custom ConVars to open the CGameConsole and CCompanion Windows.
* Changed ResolveRelativeAddress.
* Added Config System for the Gui.
* Added ImGui::Hotkey.
* Added the ability to change 2 hotkeys for opening the window for CGameConsole and CCompanion.
* Changed pattern for Squirrel_CompilerError to use a String.
* Added IMemAlloc::AllocWrapper to patterns.h

* Changes in description.

* Added icon to launcher.exe
* Launcher.exe gets remnamed to Run R5 Reloaded.exe in launcher release compilation configuration.
* Extended argument buffer for starting the game in launcher.exe.
* Added exception printing if in the custom ConVars an invalid value gets passed.

* Wrong return.

* Added shortcut with launch params.

* Fixed prints.

Co-authored-by: Marcii0 <58266292+Marcii0@users.noreply.github.com>
Co-authored-by: BobTheBob <32057864+BobTheBob9@users.noreply.github.com>
2021-08-19 15:26:44 +02:00
IcePixelx
3c641687f1 Fix post-build for r5dev debug compilation. 2021-08-17 22:17:58 +02:00
IcePixelx
01d3be4c66 Prebuild event for debug dll. 2021-08-16 16:32:28 +02:00
IcePixelx
a78484b5c5 Read description for changes.
* Updated r5net. Checking for version number now.
* Added SQVM_Warning hook.
* Adjusted IsFlagSet, will only mask off DEV_FLAGS in Release compile now.
* Empty hostname cvars.
2021-08-15 19:57:33 +02:00
IcePixelx
b3ea6c9c94 Check if script checksum is valid. 2021-08-15 01:00:39 +02:00
IcePixelx
755fa46ea4 You shall not clear the string. 2021-08-14 23:53:18 +02:00
IcePixelx
ef69bbb947 Update CCompanion.cpp 2021-08-14 23:02:59 +02:00