Huge cleanup for dedicated. All patches in 'opcodes.cpp' are now directly applied to the executable, and kept as reference in the source file. The patch logic is commented. Any other patches for the dedicated server executable should be documented in the patch file found in 'r5dev/resource/patch'.
Duplicate checks are only performed in debug builds, if a duplicate is encountered, a bug in code has been found and has to be solved (do not call REGISTER from headers for example).
This implementation was done to calculate buffer CRC on the go, as that was what the VPK file system uses for the file crc's. But it later turned out to be unnecessary, and was never reverted.
Only add to detour if the VFTable pointer didn't exist yet. Not declaring these in the anonymous namespace significantly reduces code size and unnecessary memory allocations. We might want to consider refactoring this, although it will probably require a big change.
'ImGuiConfig::Load()' was loading from the new path, however 'ImGuiConfig::Save()' was not. Defined path as constant expression to avoid this problem in the future. Also loading the files through the engine's API from now on.
* Fix history duplication by removing trailing white space characters from submitted commands in console.
* Fix out of range exception caused by caching svConVar.size() in CConsole::BuildSummary while we are modifying it.
* Fixed memory leak caused by extraneous Strdup calls in CConsole.
* Renamed variables and structure members, static vars in id3dx.cpp are not prefixed with s_, IBrowser_Config is now m_BrowserConfig.
* Performed code cleanup in id3dx.cpp.
Previously we enabled/disabled the input system each frame, depending on the state of the ImGui windows. This commit changes the behavior into only enabling/disabling when the menu's are closed (either through the keyboard or the close button).
I added a simple callback to ImGui::Begin which will be called when the close button on the ImGui panel is pressed and the callback pointer isn't nullptr, this was required as there was otherwise no way to determine when the close button was clicked.
* Fixed bug where the in-game console could not color the line when no newline was found.
* Changed behavior to only newline when: '\n' has been found, or the context has changed (using a print without newline will continue to print on the same line in the console).
* Pass ImVec4 parameter in 'CTextLogger::InsertTextAt' by reference.
Upgrade includes all the modifications we brought to the library (SetWindowScrollX/Y, autocaret end, mouse state adjustments for game, highlight around input selection, hotkeys, etc..).
* Use proper method of obtaining content regions for buttons.
* Set min and default size to (928 - 524), this improves the anti-aliasing effect even more.
* Significantly decrease the size of the private server modal.
* Removed extraneous min window size constraint set by 'ImGuiConfig::InitStyle()'.
* Fixed bug where attempting to select text, while auto scroll is disabled, and entries are being removed, while entries are also being added, causes the start of the selection to not adjust with the number of lines being removed, which then causes it to move with the deletion.
* Eliminated all forms of concurrency for CConsole logger.
* Used enum for determining which theme user loaded (DEFAULT, LEGACY, MODERN).
* Fixed issue where browser panel doesn't have the same frame padding as the console for the modern theme.
* Fixed issue where the history items count shows number higher than maximum until updated (updates vector before displaying, else this happens in g_pConsole->RunTask which is the operation that happens before we add new elements to the vector, thus showing the wrong count as this size is getting corrected the next frame after we painted, we don't update the summary each frame for performance reasons).
* CTextLogger: Explicit cast return value of size() to int when testing int value against size_t.
* CBrowser: Run think and request thread on client.dll, but for the request, only the refresh.
* Moved ConVar usage text that where part of the help string to the usage string parameter.
* Flagged ConVar 'bhit_abs_origin' as FCVAR_DEVELOPMENTONLY | FCVAR_REPLICATED.
* Flagged ConCommand 'bhit' as FCVAR_DEVELOPMENTONLY | FCVAR_GAMEDLL.
* Check 'bhit_enable' before running the 'bhit' command callback.
* Fixed spelling in a few area's.
* dtIntersectSegSeg2D: Calculate over zy-plane instead.
* dtOverlapPolyPoly2D: Calculate over zy-plane instead.
* dtNavMeshQuery::findRandomPoint: z = h.
* dtNavMeshQuery::raycast: Invert hit normals.
* Update all comments to use xyz vector instead (previously xzy (xz-plane z-height)).