1235 Commits

Author SHA1 Message Date
Kawe Mazidjatari
8198866f6f Add tile range for NavMesh debug draw
New cvar 'navmesh_debug_tile_range' (tile shift index to this cvar gets drawn).
2022-07-22 12:44:33 +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
PixieCore
178aeeb3fd Use GetVirtualMethodTable for VTable consts. 2022-07-21 20:36:47 +02:00
rexx
2d25c504fb remove init of streamoverlay buffer 2022-07-21 17:07:20 +01:00
rexx
2e3b4205c0 remove streamoverlay hook 2022-07-21 17:05:19 +01:00
Kawe Mazidjatari
d4f9e68930 'g_ppGameDevice' confirmed compatible with earlier builds 2022-07-21 16:56:25 +02:00
Kawe Mazidjatari
b3ed5d4052 Fix client.dll compile errors
Stripped more server only stuff from client.dll.
2022-07-21 15:13:48 +02:00
Kawe Mazidjatari
9758f988ec Add NavMesh poly debug overlay
Can be toggled and shifted through tiles using 'navmesh_draw_polys'.
2022-07-21 14:48:50 +02:00
Kawe Mazidjatari
c850d52d1b Add NavMesh poly bounds debug overlay 2022-07-21 02:21:59 +02:00
Kawe Mazidjatari
e21ae20f4a Add NavMesh tile portal debug overlay
navmesh_draw_portal > -1 enables the overlay, with this cvar you can also shift through tiles.
navmesh_debug_type [0 - 4] selects the NavMesh (small, med_short, medium, large, extra_large).
2022-07-21 01:24:07 +02:00
rexx
cb4e422724 reimplement stream overlay drawing 2022-07-20 22:50:55 +01:00
Kawe Mazidjatari
2998953600 Add NavMesh BVTree debug overlay
navmesh_draw_bvtree > -1 enables the overlay, with this cvar you can also shift through tiles.
navmesh_debug_type [0 - 4] selects the NavMesh (small, med_short, medium, large, extra_large).
2022-07-20 21:23:56 +02:00
Kawe Mazidjatari
be42e98197 CAI_NetworkBuilder::SaveNetworkGraph improvements 2022-07-20 21:06:19 +02:00
PixieCore
da800c1ad3 Should be 8 Masks not 4. 2022-07-20 18:15:54 +02:00
PixieCore
22bb1d4cde Implemented CModule::GetVirtualMethodTable.
* Added CModule::GetVirtualMethodTable. Gets you a pointer to a VTable by its rtti type descriptor name.
* Added StringToMaskedBytes. Turns a string into masked bytes.
* CModule::FindPatternSIMD now allows you to custom define a section it should search in.
2022-07-20 18:03:35 +02:00
Kawe Mazidjatari
79b4d7889a Remove non-existent member
This member was actually offMeshConsEnd
2022-07-20 17:31:35 +02:00
Kawe Mazidjatari
5b9b0164b1 Remove 'bool* is_tf2' from class 'Sample' 2022-07-20 16:44:28 +02:00
Kawe Mazidjatari
5486923f47 Improve CAI_NetworkBuilder::SaveNetworkGraph
* Use proper format specifier for short.
* Remove redundant IsBadReadPtrV2 call when writing script nodes (this was initially for debugging but hasn't been removed after development finished).
2022-07-20 16:22:03 +02:00
Kawe Mazidjatari
4f0e4eae04 Remove extraneous fclose call 2022-07-20 15:22:11 +02:00
Kawe Mazidjatari
7481cefd78 Ability to load navmeshes from game directory
Load navmeshes from '..\\maps\\navmesh\\' first before attempting to load from root.
2022-07-20 15:21:21 +02:00
Kawe Mazidjatari
68440361cc Rename IMeshLoader members 2022-07-20 15:18:34 +02:00
Kawe Mazidjatari
e5f445e9c8 NavEditor cleanup
Moved functions and structures to their own files.
2022-07-20 15:07:51 +02:00
PixieCore
8aa71d6676 RTech::CreateDXTexture cleanup. 2022-07-20 14:54:59 +02:00
Kawe Mazidjatari
31b2a6c9ec Force always reachable again
Reachability still doesn't work properly. Something shifts it in memory but I don't know yet what it is. They however did add something.
2022-07-20 12:35:13 +02:00
Kawe Mazidjatari
bd0edc663d Add 'g_pHullMasks' into SDK
Static array of hull masks
2022-07-20 12:33:39 +02:00
PixieCore
f57da25341 RTech changes.
* Added RPakAssetBinding_t.
* Added RPakUnknownStruct_t
* PatternScan the global RPakUnknownStruct_t.
* Renamed Members of CMaterialGlue
* RTechTextureInfo_t now has another unknown member named.
2022-07-20 11:27:42 +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
0ec03a62b1 Working AI reachability tables
* Set reachability table count to 1.
* Don't divide reachability write size by 4.
* Trim off all unused bytes after building reachability table.
* Default cvar 'navmesh_always_reachable' to 0.

AI behavior seems to have improved a bit, they attempt to pathfind better, and if they find a certain route they attempt another route where originally they would become stuck in such situation.

If you build the SDK after this commit, you need to rebuild all navmeshes, else the game would segfault in dtNavMesh::isPolyReachable().
2022-07-19 02:38:01 +02:00
rexx
dad356b0c3 rename materialglue/shaderglue members 2022-07-18 22:00:03 +01: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
aaec14c3d4 Update member names on currently commented saveAll body 2022-07-18 12:42:00 +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
Kawe Mazidjatari
0026723aef Add g_pNavMeshQuery signature to SDK 2022-07-17 12:55:38 +02:00
Kawe Mazidjatari
ab8d0b8f57 Improve CHostState::FrameUpdate parameter types and names 2022-07-17 12:16:31 +02:00
PixieCore
746e7e9996 CMaterialGlue changes.
* Reversed more of the class and fixed up member names.
2022-07-16 12:33:02 +02:00
PixieCore
a8b74ec93a memaddr and module const cleanup. 2022-07-15 19:43:29 +02:00
PixieCore
e0792af1ce Remove ClientClass from dedicated.
* We should consider removing cdll_engine_int.h from dedicated fully.
2022-07-15 19:22:02 +02:00
rexx
7973034bd0 temp navmesh debug drawing 2022-07-14 18:19:34 +01:00
rexx
ddae4d4775 update dtNavMesh and dtMeshTile structs 2022-07-13 19:48:19 +01:00
rexx
39c49c5b58 Update vgui_debugpanel.cpp 2022-07-13 19:47:16 +01:00
rexx
35515f1ef5 fix clientsdk compilation 2022-07-13 19:46:55 +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
Kawe Mazidjatari
c79cfa4968 Declare GetNavMeshForHull() 2022-07-13 11:44:38 +02:00
Kawe Mazidjatari
2dd66662b2 Add g_pNavMesh to SDK
Add g_pNavMesh to SDK and a simple wrapper for obtaining NavMesh from array.
2022-07-13 11:42:07 +02:00
Kawe Mazidjatari
f4ea846284 RenderUtils cleanup. 2022-07-12 21:02:10 +02:00
Kawe Mazidjatari
bd3fe5b445 Public IVDebugOverlay VFTable interface.
New public interface to add debug overlays on the go (memory is managed by the game module).
3 new commands:
* line.
* sphere.
* capsule.
2022-07-12 17:46:47 +02:00
Kawe Mazidjatari
7de9dfd2d9 Add missing field to OverlayBox_t 2022-07-12 15:38:51 +02:00
Kawe Mazidjatari
c9c002d27a Improve readability for DebugDrawHemiSphere angle math 2022-07-12 15:06:44 +02:00