115 Commits

Author SHA1 Message Date
Kawe Mazidjatari
34a06147d7 Fix spelling errors
Overall spelling improvements and cleanup..
2022-09-09 19:47:31 +02:00
Kawe Mazidjatari
a3027a8fd1 Upgrade Dear ImGui from 1.87 to 1.88
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..).
2022-09-02 02:22:39 +02:00
Kawe Mazidjatari
0309d9cd6b Server browser UX improvements
* 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()'.
2022-08-31 15:45:12 +02:00
Kawe Mazidjatari
45c147087a Fixed console logger selection while mutating entries bug
* 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.
2022-08-30 22:54:34 +02:00
Kawe Mazidjatari
d1d523fd12 Update imgui_logger.cpp 2022-08-30 21:28:26 +02:00
Kawe Mazidjatari
3414a2cd2c ImGui panel improvements
* 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).
2022-08-22 01:10:18 +02:00
Kawe Mazidjatari
8476d22777 Fix concurrent access to several CConsole members
* Fix concurrent access to CConsole::m_Logger.
* Fix concurrent access to CConsole::m_vHistory.
* Additional DX system cleanup.
2022-08-21 19:35:06 +02:00
Kawe Mazidjatari
52e19e9ad6 Single-thread the game console
Run all task in the same thread used to run the browser/console frame and remove all mutexes.
2022-08-20 01:48:42 +02:00
Kawe Mazidjatari
329621c6ad Move all public headers into root of 'public' 2022-08-09 17:18:07 +02:00
Kawe Mazidjatari
e92b5d1300 General cleanup
Use c++ methods, remove unnecessary casts, unnecessary use of auto, etc..
2022-08-09 15:19:12 +02:00
Kawe Mazidjatari
f015667f88 Light ImGui cleanup
* 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.
2022-08-09 12:13:31 +02:00
Kawe Mazidjatari
9d06a02614 General cleanup
* Use Cbuf functions for executing commands in ImGui panels.
* Use const qualifiers for all vftable indexes.
2022-08-09 02:35:00 +02:00
Kawe Mazidjatari
ea5f17b4ca Light cleanup
* 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.
2022-08-04 16:34:23 +02:00
Kawe Mazidjatari
9eeaebaf6a Even More XZY->XYZ changes 2022-07-28 15:45:02 +02:00
Kawe Mazidjatari
cbaf10478a More XZY->XYZ changes
* 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)).
2022-07-28 14:24:29 +02:00
Kawe Mazidjatari
34076142ba More XZY->XYZ changes 2022-07-28 03:21:20 +02:00
Kawe Mazidjatari
ce28ea2691 Even more offMeshConnections debug draw fixes 2022-07-28 02:07:13 +02:00
Kawe Mazidjatari
8af97beb57 Fix offMeshConnections debug draw 2022-07-28 01:48:17 +02:00
Kawe Mazidjatari
6a1b6c580a Increase debug arow size 2022-07-28 00:52:12 +02:00
Kawe Mazidjatari
37637bc56a Properly fix cylinder, circle and arrow debug draw for Recast. 2022-07-28 00:41:47 +02:00
Kawe Mazidjatari
87a42efd72 Uncomment and fix crowd anticipate turn debug draw
Moved internal functions to their own translation unit.
2022-07-27 21:05:27 +02:00
Kawe Mazidjatari
88a29f2770 Improve crowd speed/acceleration/braking
Changed to values comparable to game.
Added sliders for acceleration and speed.
2022-07-27 20:08:17 +02:00
Kawe Mazidjatari
03698a4a5f Fix DetourCrowd
XZY -> XYZ.
Crowd agents now traverse over the poly surfaces properly.
2022-07-27 17:48:51 +02:00
Kawe Mazidjatari
0576749de0 Use transparent area color for polymesh debug draw 2022-07-27 14:30:30 +02:00
Kawe Mazidjatari
c16d87ebc5 Fix more Recast & Detour debug drawing
* XZY -> XYZ.
2022-07-27 14:29:54 +02:00
Kawe Mazidjatari
4c8027b319 Fix duDebugDrawHeightfieldLayer and RecastDebugDraw cleanup 2022-07-27 12:38:02 +02:00
Kawe Mazidjatari
df99664d2a Working Recast convex hull 2022-07-27 11:11:41 +02:00
Kawe Mazidjatari
da77600baa More XZY->XYZ places 2022-07-27 10:58:54 +02:00
Kawe Mazidjatari
8757d0a43f NavMesh convex volume drawing somewhat working 2022-07-27 03:50:11 +02:00
Kawe Mazidjatari
112a530d5a Improve Recast & Detour and NavMesh generation
* Add missing dtQueryFilter field (some flag used in the engine but not sure yet what it does).
* Set tile->polysEnd and tile->offMeshConsEnd to end of polys and offMeshCons array pointer (if ever needed).
* Set camera perspective to 75 (previous 50).
* Improve theme.
* Lowered the climb height for all hulls (this improves NavMesh generation around low obstacles, previously it would create a poly connecting the ground on the side with the surface of the object around where it connects with the ground, causing AI to take this route instead and kind of 'glitch' onto the surface).
2022-07-26 14:23:02 +02:00
Kawe Mazidjatari
ff0ae1c13b Fix dtMeshTile structure
Removed old member that should had been removed earlier. All members align now.
2022-07-22 12:28:39 +02:00
Kawe Mazidjatari
c850d52d1b Add NavMesh poly bounds debug overlay 2022-07-21 02:21:59 +02:00
Kawe Mazidjatari
79b4d7889a Remove non-existent member
This member was actually offMeshConsEnd
2022-07-20 17:31:35 +02:00
Kawe Mazidjatari
c0d3dafa6f Update dtNavMeshQuery structure
Member 'filter' has been moved out of 'dtNavMeshQuery::dtQueryData'. New offset = 0x60 (after m_openList). Renamed to 'm_queryFilter' to maintain consistency.
2022-07-20 01:33:09 +02:00
Kawe Mazidjatari
59dd3e2228 NavMesh system improvements
* Confirmed DT_MAX_AREAS size being 32 (originally 64).
* header->offMeshEnds to -1.
* Added pointer to 'g_pHullMask'.
2022-07-19 22:00:40 +02:00
Kawe Mazidjatari
3d0162038a Improved navmesh structs
New member: header->offMeshEnds (this is used in Detour_LevelInit which sets fields to -1 starting at the pointer to end of offMeshCons array).

Currently set to 0 so the paths in opcodes.cpp could be disabled.
2022-07-18 21:38:07 +02:00
Kawe Mazidjatari
9f27b58f95 Improve struct member naming consistency
Improved alignment of class 'Sample' and improved naming consistency.
2022-07-18 19:32:36 +02:00
Kawe Mazidjatari
57bb9dffce Update dtNavMesh, dtNavMeshParams and dtMeshTile structures
dtNavMesh is now almost fully mapped out (most members should be correct, the only unsure ones are the unknowns and the mesh/tile flags).

dtNavMeshParams has one new field (I think the last field determines the precomputed malloc size, but I'm not very sure. It would make sense with the inline loop in 'Detour_LevelInit()' setting a certain field in each tile to -1).

dtMeshTile has one extra field (currently unknown) and the renamed unk0 field was is a pointer to the end of the 'polys' array.
2022-07-18 12:38:41 +02:00
rexx
ddae4d4775 update dtNavMesh and dtMeshTile structs 2022-07-13 19:48:19 +01:00
Kawe Mazidjatari
46a3535b27 Update dtMeshTile structure
Actual size is 0x78 (header2 also gets assigned to the header pointer in r5apex.exe + F43FFA).
2022-07-13 12:08:10 +02:00
Amos
69b385a21a Change type to int in for loop
Tests against int, not size_t.
2022-06-30 11:29:36 +02:00
Kawe Mazidjatari
3323c3fadb Small ImGui theme adjustments 2022-06-27 14:48:03 +02:00
Kawe Mazidjatari
98c43fd6c1 Rename CConLog to ConLog_t 2022-06-26 17:40:02 +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
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
88259a69ae Allow selection while cursor is no longer hovered over child window 2022-06-24 15:23:14 +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