1272 Commits

Author SHA1 Message Date
PixieCore
7eb6952df0 Use const in memaddr.cpp where its supposed to be. 2022-06-29 16:32:40 +02:00
Kawe Mazidjatari
a20d6a163e Work-in-progress pylon master server implementation
Still in development.
Implemented new fields provided by pylon-ms.
2022-06-28 00:47:01 +02:00
Kawe Mazidjatari
2e4c3f5fde Remove comment
Forgotten.
2022-06-27 16:57:11 +02:00
Kawe Mazidjatari
2a5cbf9b22 Switch to uint32_t for script checksums
Crc32 is unsigned int (32-bit).
2022-06-27 16:56:20 +02:00
Kawe Mazidjatari
1d7b32b789 Preparation work for pylon master server implementation 2022-06-27 16:54:40 +02:00
Kawe Mazidjatari
838c183b10 Use highlighted tab bars in server browser 2022-06-27 15:01:39 +02:00
Kawe Mazidjatari
3323c3fadb Small ImGui theme adjustments 2022-06-27 14:48:03 +02:00
Kawe Mazidjatari
374a44f29e Rename PatternToBytesAndMask to PatternToMaskedBytes 2022-06-26 17:45:54 +02:00
Kawe Mazidjatari
98c43fd6c1 Rename CConLog to ConLog_t 2022-06-26 17:40:02 +02:00
Kawe Mazidjatari
2da11d2d32 Disable undo/redo in command input
Currently causes undefined behavior, though it rarely crashes (I couldn't reproduce the crash, but do get undefined behavior by having random memory end up in the input field, or similar)
Problem probably is because we don't store any undo/redo buffer.
For now disabled, will revisit in the future.
2022-06-26 17:14:32 +02:00
Kawe Mazidjatari
5480d450a2 Update imgui_logger.cpp 2022-06-26 17:10:52 +02:00
Kawe Mazidjatari
efe71fbe24 ImGui console UX improvements
* Fixed click-through parent window.
* Keep selection position when lines get cleared.
* Keep cursor position when lines get cleared.
* Ensure cursor visibility when dragging cursor outside rect.
* Falter free scrolling in autocomplete window.
* Falter free scrolling in logging window (window no longer stutters when lines get cleared).
2022-06-26 16:47:00 +02:00
PixieCore
8867b3bd7b Even faster startup now. 2022-06-25 12:05:09 +02:00
PixieCore
232680a2a6 CMemory::FindPattern cache bytes in L1.
* Pre-fetch bytes and cache them in L1.
2022-06-25 11:58:30 +02:00
PixieCore
64cf0d33d7 Fixed convention naming in PatternToBytesAndMask. 2022-06-25 00:10:36 +02:00
PixieCore
5ecac66dba Overloaded FindPatternSIMD that only takes 1 string.
* Uses IDA Style Pattern, Byte Array and Mask get created from that pattern.
2022-06-25 00:08:02 +02:00
PixieCore
39de0c3687 memaddr adjustments. 2022-06-24 23:32:47 +02:00
Kawe Mazidjatari
d7a004a0eb Fixed bug where auto-scrolling occasionally gets disabled
Issue happened when scrolling back, most of the time it will work, but there is always jitter in the first frame after the change which could result in ImGui::GetScrollY() <= ImGui::GetScrollMaxY() resulting in auto-scroll disable.
Only scroll back if ImGui::GetScrollY() <= ImGui::GetScrollMaxY() and always reset value of CConsole::m_nScrollBack.
2022-06-24 18:28:26 +02:00
Kawe Mazidjatari
cdc32531eb Prevent selection in console when scrollbar is active
Fixed issue where scrolling with the scrollbar would select text whilst sliding.
Improved UX by not showing the text edit cursor when scrollbar is hovered.
2022-06-24 17:43:50 +02:00
Kawe Mazidjatari
f0519efbb5 Fix SDKLauncher bug
Fix bug where SDK Launcher would display duplicate map names if server and client VPK's are installed within the same VPK directory.
2022-06-24 17:03:50 +02:00
Kawe Mazidjatari
fbcee16f97 CAI_NetworkBuilder::SaveNetworkGraph improvements
Use CIOStream class.
Use proper type for CAI_Network::m_iNumNodes.
Improved CIOStream to take std::filesystem::path instead of std::string.
2022-06-24 16:56:28 +02:00
Kawe Mazidjatari
88259a69ae Allow selection while cursor is no longer hovered over child window 2022-06-24 15:23:14 +02:00
Kawe Mazidjatari
609af5e4b7 Strip tilde/grave/space characters from console properly
If input only contains the '~', '`' or ' ' character, it gets stripped from the input buffer. e.g. '````````' or '~' gets stripped, but 'script_ui printl("test `````")' or 'script_client printl("~CEngineClient()")' does not.
2022-06-24 14:23:12 +02:00
Kawe Mazidjatari
2eda8235b7 Slight theming tweaks
Minor improvements to small detail:
No child border on console on default theme (this is invisible).
Tweaked first use size and min size where by default the text would always perfectly align between ScrollY min and max.
2022-06-24 12:45:47 +02:00
Kawe Mazidjatari
add5c577ff Improve ImGui theme system
-imgui_theme "modern" = Respawn theme.
-imgui_theme "legacy" = Valve theme.
No args = default theme.
2022-06-24 12:22:04 +02:00
Kawe Mazidjatari
5f64a14a87 Add 'ssize_t' to skdefs.h (size error type) 2022-06-24 12:12:59 +02:00
Kawe Mazidjatari
e22c17340f Add 'UTF8CharLength(..)' to utility.cpp 2022-06-24 12:12:30 +02:00
Kawe Mazidjatari
e1ede0c995 Remove unused function from imgui_logger.cpp 2022-06-24 12:12:00 +02:00
Kawe Mazidjatari
479adc4b85 CCommandLine additions 2022-06-24 12:10:46 +02:00
Kawe Mazidjatari
ef454ac126 Reversed CCommandLine members
Fixed wrong order of 'CCommandLine::ParmValue()' methods. Float overload was first, char const* last.
Added reversed members (confirmed size of 2096 bytes).
2022-06-24 02:42:28 +02:00
PixieCore
1da841d4dd Remove troll function from HLClient. 2022-06-23 21:08:56 +02:00
Kawe Mazidjatari
2678fe2ec8 StreamDB_Init cleanup
Removed unused third parameter from DevMsg call.
Added log for loading non override STBSP files.
2022-06-23 20:08:07 +02:00
Kawe Mazidjatari
965b4f4367 Remove VecNetMessages and VecNetDataFragments
Improved and used CUtlVector class instead.
2022-06-23 19:52:58 +02:00
Kawe Mazidjatari
1b6f40d941 Fix for SVC_UserMessage
Removed padding that was causing the structure to misalign with the game's one.
Enabled 'SVC_UserMessage::Process()' hook (function works properly after the structure alignment).
2022-06-23 18:20:17 +02:00
IcePixelx
f1395c0bad
Little cleanup, branch to test changes when at home. (#69)
* Little cleanup, branch to test changes when at home.

* Remove non-used variables
2022-06-23 18:03:53 +02:00
PixieCore
0e4c126823 Revert NULL passing into second arg (was for testing) 2022-06-22 14:06:53 +02:00
PixieCore
62ac2c03ff RTech::CreateDXTexture fix for CreateShaderResourceView 2022-06-22 14:03:41 +02:00
Kawe Mazidjatari
426ae0c4cd Bad logic logging improvements
Log bad logic in colors for every game logic error.
Added 'g_flErrorTimeStamp' and a hook to 'SQVM_LogicError'.
2022-06-22 12:12:08 +02:00
Kawe Mazidjatari
33f517d809 Use XOR operator for toggling menu's 2022-06-22 10:19:44 +02:00
Kawe Mazidjatari
978c43250f Console cleanup and optimizations
Proper usage of callbacks, no longer use string comparisons to check if buffer changed.
Improved optimizations with avg 5000 clocks in release and avg 600000 clocks in debug (no filter).
2022-06-22 03:24:46 +02:00
Kawe Mazidjatari
83e855112a Update default ImGui theme 2022-06-22 01:17:10 +02:00
Kawe Mazidjatari
145b5dcd13 CTextLogger cleanup
Reordered structure.
Use C++ style casts.
changed m_flLastClick (float) to double.
2022-06-22 00:33:12 +02:00
Kawe Mazidjatari
76ec4b8f4a Improve console scrolling
Moved auto scrolling logic to CTextLogger.
Removed redundant code in CTextLogger.
Added bool param to CTextLogger::RemoveLine to determine whether or not to lock the mutex (internal operations should not lock).
Fixed issue where scrolling with cursor is not possible when auto-scroll is set or ScrollY is towards its max.
Fixed copy button (copy all text in console via GUI, ctrl + a - ctrl + v alternative).
2022-06-21 23:25:15 +02:00
Kawe Mazidjatari
a436b70601 CConsole / CTextLogger optimizations
CConsole: cast to proper types.
CTextLogger: only compute line string if filter is active.
2022-06-21 20:20:12 +02:00
Kawe Mazidjatari
3e2c395584 Don't append newlines on obtained text
Newlines are added through the SDK, and the CTextLogger class has been modified to insert a newline when in encounters a newline character.
2022-06-21 11:32:40 +02:00
Kawe Mazidjatari
a534ef1e3c Type untyped variables in CTextLogger
All of these are known types that aren't going to change.
2022-06-21 11:13:30 +02:00
Kawe Mazidjatari
f7dd4089f0 Logger improvements
Fix crash cases due to concurrent access and wrong type casting.
Improve filter logic (now greys out everything outside criteria).

TODO: Return 'size_t' for everything size related.
2022-06-21 10:14:20 +02:00
Kawe Mazidjatari
98741a9591 Remove redundant 'PrintPercentageEscape' calls 2022-06-21 10:12:15 +02:00
Kawe Mazidjatari
da299a002c Reimplement text filter
Could be better at some point, currently removes anything not matching criteria resulting in gaps.
But on the other side it might be good as the location of all occurrences are known (should make it easier to see when it is logged during the process).

Revisit in the future.
2022-06-20 20:21:52 +02:00
Kawe Mazidjatari
0de09217bc Log process uptime
Log actual process uptime in all (post init) loggers.
The actual process uptime is obtained from the engine (Plat_FloatTime()).
2022-06-20 15:48:33 +02:00