4359 Commits

Author SHA1 Message Date
Kawe Mazidjatari
32f470f2ed Recast: add functions for checking if point is in cylinder and AABB 2024-09-20 16:00:23 +02:00
Kawe Mazidjatari
162f5fb3c7 Recast: fix convex volume deletion (XZY -> XYZ)
Missed coordinate system conversion change.
2024-09-20 15:07:44 +02:00
Kawe Mazidjatari
290f78f8c8 Recast: fully implement cylindric and AABB shape volumes
Cylindric and AABB volumes can now also be used to mark out area's on the NavMesh. The raycast tests now also take the new shapes into account. User can now also add shapes through the ShapeVolumeTool (previously ConvexVolumeTool). The geomset format has changed slightly:
- identifier 'o' now maps to off-mesh links (previously 'c').
- identifier 'p' now maps to convex polygon volumes (previously 'v').
- identifier 'c' maps to cylinder volumes.
- identifier 'b' maps to box volumes.
2024-09-20 15:03:30 +02:00
Kawe Mazidjatari
0722def4d8 Recast: deduplicate AABB intersection test in CrowdTool 2024-09-20 14:58:22 +02:00
Kawe Mazidjatari
4640a81d09 Recast: add cylindric and AABB intersection functions
'rdIntersectSegmentCylinder' is a new function that will be used for intersection tests on cylindric clip volumes.
'rdIntersectSegmentAABB' was already present in the library, but used and reimplemented across multiple source files (pending deduplication).
2024-09-20 14:55:45 +02:00
Kawe Mazidjatari
f98b3b9bff Recast: fix order of cylinder vertex drawing (XZY -> XYZ)
Face normals were flipped after the coordinate system change. This patch solves the issue.
2024-09-20 11:43:55 +02:00
Kawe Mazidjatari
98756f1a0b Recast: reorder function
Was in between area markers, move it above.
2024-09-20 00:30:52 +02:00
Kawe Mazidjatari
11e83769b5 Recast: also assign flags to compact height field in rcMarkCylinderArea
This function is currently not in use, but will be used.
2024-09-20 00:18:23 +02:00
Kawe Mazidjatari
d0c4c0497d Recast: allow ability to mark AABB box area on NavMesh
Very useful utility when automating the creation of geometry bounding boxes to be used to mark and flag certain polygons on the navmesh (e.g. a door or hazard area through bounding boxes from a mesh or box-shaped trigger).
2024-09-20 00:10:03 +02:00
Kawe Mazidjatari
4083318f83 Recast: separate box creation code from renderer
Allow usage in external code.
2024-09-20 00:07:00 +02:00
Kawe Mazidjatari
8758550602 Recast: make tile size correct for larger navmeshes
Should be 60, which results in 960x960 tile dimensions for _large and _extra_large navmeshes (identical to r2 _large navmeshes).
2024-09-19 16:59:56 +02:00
Kawe Mazidjatari
4a9bfbe79a Recast: vastly improve reliability of land-side off-mesh link tile query
Instead of a box query, just take the position in the tile grid the land-side off-mesh vert is on. This vastly improves the query reliability for off-mesh links with a larger radius to the point it never fails if it is in a valid location. The box query isn't needed here as the off-mesh vert has to be on a tile, else the polygon box query will fail (unless its bounding box does happen to overlap with the point, but in this case the off-mesh connection is placed improperly causing the only factor to have its link established being luck).
2024-09-19 15:44:23 +02:00
Kawe Mazidjatari
2ed18dc6e0 Recast: clean up editor class
Reorder and remove non-existent method declarations.
2024-09-19 13:52:10 +02:00
Kawe Mazidjatari
ee59793118 Recast: default to layered partitioner
Watershed results in bad geometry around stairs or slopes near complex geometry. Layered partitioning results in much better results in these cases.
2024-09-19 13:51:28 +02:00
Kawe Mazidjatari
3cd61a499d Tier1: constify ConVar_ParseFlagString 2024-09-19 00:12:27 +02:00
Kawe Mazidjatari
b2d0db40ef Recast: properly flag off-mesh connection polygons
MSET 7 or higher needs proper off-mesh connection flags.
2024-09-19 00:11:49 +02:00
Kawe Mazidjatari
30570981e1 Recast: move poly flags and area enums to Detour NavMesh header
Also needs to be used in building and query code, moved to Detour NavMesh header.
2024-09-19 00:02:37 +02:00
Kawe Mazidjatari
d5fa52499c Recast: combine off-mesh link basing and land connection logic
Combine the 2 to avoid an extra loop. Also break out of tile grid loop as soon as a link has been established to save even more processing time.
2024-09-18 17:28:10 +02:00
Kawe Mazidjatari
8eaa349dbc Recast: assign dtOffMeshConnection::userId
Was never assigned properly.
2024-09-18 17:24:08 +02:00
Kawe Mazidjatari
b042327629 Recast: fix incorrect dtOffMeshConnection::userId offset
Field offset was incorrect for MSET 7 or higher.
2024-09-18 17:23:00 +02:00
Kawe Mazidjatari
1a0b6efae5 Recast: properly set traverse type fields in off-mesh connections for MSET 7 or higher
The structure was incorrect prior to this patch for MSET 7 or higher.
2024-09-18 11:41:33 +02:00
Kawe Mazidjatari
3259b03fdd Server: name unknown field in CAI_TraverseNode
Confirmed to be the traverse type.
2024-09-18 01:50:19 +02:00
Kawe Mazidjatari
0b568488e3 RapidJSON: fix bug when parsing NaN, Inf with fraction or exponent parts
Merge Tencent/rapidjson@7c73dd7de7
2024-09-16 17:48:25 +02:00
Kawe Mazidjatari
a6d4a53021 Recast: make proper wrappers for radians and degrees conversion
Avoid bugs where radians gets converted to radians, or degrees to degrees.
2024-09-16 16:29:46 +02:00
Kawe Mazidjatari
10efa56c58 Engine: don't run NVIDIA Reflex if -gfx_disableLowLatency was specified
This command line argument should fully disable NVIDIA Reflex, AMD Anti-Lag 2 and PCL statistics.
2024-09-16 16:27:02 +02:00
Kawe Mazidjatari
0eb0d73ae1 Game: make AI utility class instance static
Static allocation instead of dynamic.
2024-09-16 14:15:15 +02:00
Kawe Mazidjatari
986fe4a93d Tier2: rename curl params field name
'cust' -> 'user'.
2024-09-16 13:58:33 +02:00
Kawe Mazidjatari
8f384e424d VScript: constify callback parameters 2024-09-16 13:52:13 +02:00
Kawe Mazidjatari
2afa6d6c64 VScript: log duration of code callbacks 2024-09-16 13:46:36 +02:00
Kawe Mazidjatari
531fa21af1 VScript: add structures for closure and function proto 2024-09-16 13:37:08 +02:00
Kawe Mazidjatari
5bfa34d016 ModSystem: properly purge and delete all mods on destruction 2024-09-16 12:14:14 +02:00
Kawe Mazidjatari
10161f5f9e ModSystem: constify
Make const where possible.
2024-09-16 12:13:39 +02:00
Kawe Mazidjatari
6509983350 ModSystem: implement ParseConVars properly
The implementation was commented as it was unfinished. The code now properly checks if the convar was already registered. The code now also deallocates the convar memory on shutdown.
2024-09-16 12:08:38 +02:00
Kawe Mazidjatari
dbdafd44e4 Recast: fix toggle for all polygon flags
1<<16 will overflow u16 by 1.
2024-09-16 11:49:21 +02:00
Kawe Mazidjatari
ebd89d934f NVIDIA: only run and shutdown PCL stats if it has been initialized 2024-09-15 12:45:26 +02:00
Kawe Mazidjatari
7d7c31d4a0
Merge pull request #127 from Mauler125/amd-anti-lag
AMD Anti-Lag 2 Low Latency
2024-09-15 12:18:38 +02:00
Kawe Mazidjatari
d5abb89d9b Client: remove version from convar string
In case more anti-lag versions get released, since this is the highest level cvar controlling the system.
2024-09-15 12:16:09 +02:00
Kawe Mazidjatari
b182a8eca8 Client: add AMD Anti-Lag 2 settings convar
Used to hook it up to scripts.
2024-09-14 12:51:45 +02:00
Kawe Mazidjatari
690272e8e1 Engine: fix compile error for dedicated server
NormalizeFrameRate should not be compiled for dedicated as g_pGame only exists on client builds.
2024-09-14 12:11:29 +02:00
Kawe Mazidjatari
720584be25 AMD: Implement Anti-Lag 2 SDK
AMD's equivalent of NVIDIA Reflex.
2024-09-14 11:57:18 +02:00
Kawe Mazidjatari
e7432eeba0 MaterialSystem: add AMD PF ID constant 2024-09-14 11:37:07 +02:00
Kawe Mazidjatari
a9ed8f66c4 Thirdparty: add AMD Anti-Lag 2 SDK
Not implemented yet.
2024-09-14 11:35:12 +02:00
Kawe Mazidjatari
d399b486b6 NVIDIA: rename Reflex function prefixes
Prevent ambiguity when AMD Anti-Lag 2 is implemented.
2024-09-13 21:29:25 +02:00
Kawe Mazidjatari
ae60220a00
Merge pull request #126 from Mauler125/backtrace
Implement crash reporting system (Backtrace)
2024-09-13 20:26:48 +02:00
Kawe Mazidjatari
cb61ff2875 Tier2: implement crash reporter
Submit all relevant crash details to the error collection server (backtrace), this allows us to catch all remaining bugs in the engine and sdk and fix them more effectively. The old local log file containing details of the crashing thread and system details are still logged since this system can be disabled with the console variable 'backtrace_enabled'.
2024-09-13 20:17:54 +02:00
Kawe Mazidjatari
98f4f57afe Tier0: crash handler reliability improvements
* Break out of loop when we found and cached the primary graphics device.
* Log total and available ram with more accuracy.
* (New) log total and available disk space the game is being ran from.
* Cache hardware details such as disk space, ram space and graphics device so the crash callback could also use it.
* Calculate highest XMM number as unsigned so an ABS call is not needed.
* Make the crash callback const.
* Provide pointer to instance to the crash callback.
* Fix crash callback not running properly; it should always be ran in the context of the current crash, not after. The callback is now ran after the crashmsg application has been started.
2024-09-13 20:01:40 +02:00
Kawe Mazidjatari
7ef0a77bb9 Core: improve CPU clock speeds formatting
Same length but the fractional component shows clock speed with more accuracy now.
2024-09-13 19:44:18 +02:00
Kawe Mazidjatari
fa5a8f8be8 Tier2: add option to fail on error in cURL params 2024-09-13 19:36:13 +02:00
Kawe Mazidjatari
9f935ec4b4 Tier2: implement cURL upload file utility 2024-09-13 19:34:33 +02:00
Kawe Mazidjatari
0f89a4e3db Tier0: only ABS on signed types in ExtremeElementABS
Bug fix.
2024-09-07 14:59:16 +02:00