2027 Commits

Author SHA1 Message Date
Kawe Mazidjatari
22d2cc5a7a Change 'FileFindHandle_t' type
Make 64 bits for target.
2023-02-04 16:00:14 +01:00
Kawe Mazidjatari
60ab35b5c4 Light optimizations for string utils
* Changed 'CreateDirectories' to only copy sanitized path if pointer to string is passed.
* Changed 'IsValidBase64' to only tokenize base64 value if pointer to string is passed.
2023-02-04 15:59:45 +01:00
Kawe Mazidjatari
588cb146bf Cleanup ebisusdk init 2023-02-04 15:55:32 +01:00
Kawe Mazidjatari
0dace8eea3 Fix crash during init
If an error occurs during init, and 'Error' is called, the program will segfault. Fixed by only running the 'send' code from RCON after it has been initialized.
2023-02-04 01:34:08 +01:00
Kawe Mazidjatari
14aff2d7b7 CCrashHandler: improve readability
Use macro instead of the code directly.
2023-02-04 01:04:06 +01:00
Kawe Mazidjatari
b160f39379 Improve server browser styling
Set minimum window size based on theme, so that if there are more servers than displayable, the last listing wouldn't clip under the panel frame.
2023-02-04 01:03:18 +01:00
Kawe Mazidjatari
649e6cb63c CBaseAnimating: move trailing padding
Move trailing padding from 'CBaseAnimating' to start of 'CBaseAnimatingOverlay' (VFTable).
2023-02-04 01:01:32 +01:00
Kawe Mazidjatari
c9fa7f7767 Rename origin globals 2023-02-04 00:39:34 +01:00
Kawe Mazidjatari
4c123e20d0 CIOStream and CSigCache class improvements
CIOStream:
* Use flag based system instead (common flags are aliased; uses std::ios_base::openmode).
* 'ReadString' now writes into a string buffer (reference) that needs to be passed in by programmer (avoids copy).
* 'm_nSize' is now synced with any write operations.

CSigCache:
* Fixed bug causing crash when 'DecompressBlob' failed (results were never checked).
* Light formatting improvements.
2023-02-04 00:36:05 +01:00
Kawe Mazidjatari
abf56ac43b Sha256 > 4gb support
Make size parameters 64 bits.
2023-02-01 23:24:18 +01:00
Kawe Mazidjatari
b0880f8f0e Fix wrong function name
Should be 'ThreadInterlockedCompareExchange'.
2023-02-01 21:41:16 +01:00
Kawe Mazidjatari
3ea7cc1cd4 CModule: class improvements
* Added 'GetImportedFunction'.
* Remove extraneous std::string copy constructors during construction of 'm_vModuleSections'.
* Added extra constructor using base address.
2023-01-31 23:52:11 +01:00
Kawe Mazidjatari
af42dfafe3 Bump sig cache version
Signatures have changed, force rebuild of db.
2023-01-31 23:46:26 +01:00
Kawe Mazidjatari
ffcefdd64e Rename 'g_pNetKey' to 'g_NetKey'
Not a pointer in engine code, only in SDK.
2023-01-31 23:44:01 +01:00
Kawe Mazidjatari
c2efdb59ae Move CViewRender vtable init to GetCon 2023-01-31 23:43:29 +01:00
Kawe Mazidjatari
8537881781 Fix stream overlay bug
Unfree texture memory displayed the value of total texture memory. Offset search with 4 bytes to yield correct results.
2023-01-31 23:42:43 +01:00
Kawe Mazidjatari
b51baee6cd Correct vtable name
First vtable in the hierarchy of ConVar is the base table.
2023-01-31 23:09:22 +01:00
Kawe Mazidjatari
e50601ed29 Rename 'g_bDedicated' to 'm_bIsDedicated' 2023-01-31 22:40:15 +01:00
Kawe Mazidjatari
6e32464519 Rename 's_bDedicated' to 's_bIsDedicated'
's_bIsDedicated' is the original name (see TRACEINIT in game executable).
2023-01-31 22:30:45 +01:00
Kawe Mazidjatari
419bf12e06 Add abstracted functions to determine build type
Allow scripters to determine whether or not this is a dedicated server or client only build. Note that these should not be abused in scripts! Since the client dll doesn't support running games locally, loading up the lobby isn't going to work when you leave a match (which is the current implementation in the scripts). with this, the scripter could do other things such as loading the title screen, or connecting to a remote lobby server if this happens to be a client only build.
2023-01-31 22:26:29 +01:00
Kawe Mazidjatari
34f69a5b1e Move crashhandler implementation to tier0 2023-01-31 22:13:40 +01:00
Kawe Mazidjatari
281addc68e Fix crash whitelist not working on client.dll
Unregister gamesdk's crash handler if -noworkerdll is passed. This is required as both crashhandlers will be called during an exception, and on one, the whitelist wouldn't work.
2023-01-31 21:48:42 +01:00
Kawe Mazidjatari
ad71360dcd Don't register 'HSV_Main' on client dll 2023-01-31 20:55:15 +01:00
Kawe Mazidjatari
2ecc556d08 Fix CClientState shifted pointer
Shifted pointer address was wrong, this approach is more robust.
2023-01-31 20:54:58 +01:00
Kawe Mazidjatari
b33c8794a0 Reorder registration order
Slight reorder, removed 'VStudioRenderContext' from dedicated.
2023-01-31 17:21:16 +01:00
Kawe Mazidjatari
462439b1dc Improve string formatting
Flip bracket.
2023-01-31 17:10:17 +01:00
Kawe Mazidjatari
b7dd5e11c1 Fix bug causing init errors not getting logged
Initialize console and spdlog before anything else that is using the console to log errors to (in this case, winsock init errors were never getting logged).
2023-01-31 17:09:56 +01:00
Kawe Mazidjatari
13a31febd4 GetUserCmd: Return 'CUserCmd*' 2023-01-31 16:23:16 +01:00
Kawe Mazidjatari
c0a38a6c26 Additional renames 2023-01-31 16:21:51 +01:00
Kawe Mazidjatari
c17913bfe9 Light cleanup of pak load api var names
* Rename some pakload api vars.
* Removed 2 duplicate pointers from (g_ClientState_Shifted and g_pakLoadJobID).
* Removed unnecessary signonstate check in 'Mod_ProcessPakQueue' for dedicated.
2023-01-31 16:09:30 +01:00
Kawe Mazidjatari
8b6e22473e Fix clang-cl compile errors
Unfortunately clang-cl doesn't support __FUNCTION__ macro concat. Some SSE stuff in mathlib/navmesh rendering also needs to be made portable at some point.
2023-01-31 14:31:17 +01:00
Kawe Mazidjatari
918535ff0f Fix crash during bots simulation
Wrong ptr to 'CUserCmd::Reset'.
2023-01-31 00:03:40 +01:00
Kawe Mazidjatari
e783309d76 Add hook error detection in system hooking 2023-01-30 22:09:15 +01:00
Kawe Mazidjatari
0a319971dd Hook ResizeBuffers to obtain rect size during resize
Required as the initialization only sets it to the startup rect size. This will always be up-to-date during resizes.
2023-01-30 22:08:01 +01:00
Kawe Mazidjatari
0895adff35 Disable server hitbox debug draw by default
Disabled by default in development cfg's.
2023-01-30 21:47:30 +01:00
Kawe Mazidjatari
2e6381cfc6 Add hook error detection in input hooking 2023-01-30 21:45:53 +01:00
Kawe Mazidjatari
fd5d09d843 Fix small mistake
Input hooking must be done during SDK init, only DX should be initialized later due to late binding of game pointers.
2023-01-30 21:44:28 +01:00
Kawe Mazidjatari
f0512d7f92 Add 'CAppSystemGroup::Destroy' callback
* Add hook for 'CAppSystemGroup::Destroy'.
* Moved 'IAppSystem.h' header file to public.
2023-01-30 21:22:17 +01:00
Kawe Mazidjatari
c84622cfd6 DirectX hook refactor
Refactored code to only feature game pointers, this avoids the unnecessary overhead that was previously caused by creating our own device pointers, swapchain, etc.. This commit also fixes the classic 'black screen' problem when the aspect ratio is set to 4:3 - 5:4, however, a similar bug returned for this causing Dear ImGui to not draw at all when the aspect ratio is set to 4:3 - 5:4. This commit also moves the old HwndProc hook to 'CGame::WindowProc'.
2023-01-30 20:18:11 +01:00
Kawe Mazidjatari
0f9c9d5ae4 Add 'g_pImmediateContext' to SDK
Grab ptr to game dx device context.
2023-01-30 16:10:46 +01:00
Kawe Mazidjatari
0227f1bca3 Adjust the width too 2023-01-30 01:59:25 +01:00
Kawe Mazidjatari
3eae093dc6 Console theme improvements
* Adjust window min size based on theme to always make the log lines line up when the window height is set to its min.
* Pad logger border with 1 for all themes.
2023-01-30 01:52:32 +01:00
Kawe Mazidjatari
a872c9ac7a Server browser theme improvements
* Pad server list tables properly.
* Pad and size private server modal properly for each theme.
* Light code cleanup.
2023-01-30 01:18:51 +01:00
Kawe Mazidjatari
ca9143dde9 Add curl cvars for debugging 2023-01-30 00:04:11 +01:00
Kawe Mazidjatari
9164856b95 Fix browser display defect
Fix defect causing frames to not animate properly when browser menu is invoked.
2023-01-29 19:30:37 +01:00
Kawe Mazidjatari
c86c965290 Disable Dear ImGui 'ctrl+tab' shortcut menu
This menu isn't in much need, in fact; we didn't even knew it existed until someone started to complain about it! Currently, the drawing logic isn't setup to support this properly either. Disabled the shortcut menu.
2023-01-29 19:07:02 +01:00
Kawe Mazidjatari
70d20db811 Update default development cfg's 2023-01-29 17:20:29 +01:00
Kawe Mazidjatari
184f5cae4b Update default RCON cfg's 2023-01-29 17:18:16 +01:00
Kawe Mazidjatari
8ed5a3a695 Connect RCON to localhost by machine name
Connect to local host using machine name when ip is set to 'localhost'.
2023-01-29 17:12:33 +01:00
Kawe Mazidjatari
5f56c23af2 Compile CRConServer for gamesdk
RCON can now be used on the host game as well (previously dedicated exclusive).
2023-01-29 16:07:02 +01:00