4268 Commits

Author SHA1 Message Date
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
Kawe Mazidjatari
1a551739b4 Core: fix incorrect typedef for f64 (double-precision floating point)
f64 was unused but will be used.
2024-09-07 00:26:48 +02:00
Kawe Mazidjatari
36484dbb82 Recast: increase traverse link brightness 2024-09-04 22:47:58 +02:00
Kawe Mazidjatari
0b606b21fd Recast: improve code consistency 2024-09-04 22:47:36 +02:00
Kawe Mazidjatari
e019de8dcd Recast: make detail triangle flags enum shared
The same constants are used between Recast and Detour, but Recast had to declare and match the constant locally as it couldn't access the one from the Detour library. This patch avoids duplicate definitions and potential issues during refactors.
2024-09-04 16:19:19 +02:00
Kawe Mazidjatari
6fa5080fe5 Recast: also cast ray against convex hulls for clip brushes
A ray should not go through clip brushes. This fixes an issue were traverse links are generated inside or through clip brushes.
2024-09-04 16:08:30 +02:00
Kawe Mazidjatari
6050ce5555 Recast: boilerplate code and constants deduplication 2024-09-04 13:39:05 +02:00
Kawe Mazidjatari
33acd65e5a Recast: initialize member variable in OffMeshConnectionTool 2024-09-04 11:44:12 +02:00
Kawe Mazidjatari
9f0312cbf1 Recast: add option for changing off-mesh connection radius
New slider that is also synced on change with the selected NavMesh type.
2024-09-04 11:38:00 +02:00
Kawe Mazidjatari
1378a6db9c Recast: make off-mesh links more visible
Use the dark blue color so it doesn't collide with traverse link colors.
2024-09-04 11:21:32 +02:00
Kawe Mazidjatari
e89a1d9436 Recast: add the last few flags to the list as well 2024-09-04 10:36:11 +02:00
Kawe Mazidjatari
d1bad5c130 Recast: add logic for setting polygon flags in convex hulls
User can now define a convex hull or box area, and set polygons flags as desired from the convex volume tool or through the project files.
2024-09-04 10:30:54 +02:00
Kawe Mazidjatari
f364e1b4c3 Recast: add array of poly flag names 2024-09-04 10:26:41 +02:00
Kawe Mazidjatari
9113b36bfd Core: fix typo's in function comment headers
Small typo's, fixed to retain consistency.
2024-09-04 01:09:09 +02:00
Kawe Mazidjatari
78e2987ca9 Server: fix incorrect edict parameters in public interface
Shouldn't be pointers; in this engine, edict_t is an unsigned short.
2024-09-04 01:05:01 +02:00
Kawe Mazidjatari
6e26b3c4be Server: fix compile error
Belongs to commit c64f28be25d2adec24d921a5a2398325fa93abab.
2024-09-04 00:58:22 +02:00
Kawe Mazidjatari
f5c0b428cb Recast: add hook bodies for NavMesh functions
Used for debugging the Detour implementation of the engine.
2024-09-04 00:57:26 +02:00
Kawe Mazidjatari
c64f28be25 Server: fix rare NavMesh hotswap crash
Detour_LevelInit resets the global NavMesh query, but if code is going to utilize the global Detour query for an existing query on a subsequent frame without attaching a NavMesh in the mean time, the code will crash. The previously attached NavMesh type has to be reattached after the hotswap.
2024-09-04 00:48:54 +02:00
Kawe Mazidjatari
7739a6c909 Recast: minor improvement to traverse link selection algorithm
Slight optimization to skip unsupported ones out before computing anything, and also improves the generation results as we try to get the best one out of the supported ones, instead of taking one from supported and unsupported and then later check if its unsupported. (if the best type is 9, and 9 isn't supported while 8 is, and 8 would've been the candidate after 9, then this patch will still give the link a chance for 8 while the previous implementation would've skipped it entirely and returned DT_NULL_TRAVERSE_TYPE, ultimately resulting in no link whatsoever.
2024-09-04 00:42:58 +02:00
Kawe Mazidjatari
0814efe613 Recast: API improvement; move traverse link algorithm to navmesh class
The algorithm has been moved to the dtNavMesh class, and now features a parameter based design allowing code that utilizes the algorithm to define engine-specific tests such as the raycasting, traverse masking, etc. The code can now be hooked up to any level editor without changing a line of code inside the Recast & Detour library. All parameters have been documented thoroughly. The code now also properly returns errors if out of memory, or if invalid parameters were provided. This commit does not affect the results of the traverse link generation, the navmesh remains identical to the one generated on the previous design.
2024-09-04 00:31:03 +02:00
Kawe Mazidjatari
1e92548624 Recast: move common definitions to separate header
Moved to separate header so they can be used everywhere.
2024-09-03 11:08:23 +02:00
Kawe Mazidjatari
98454cceab Recast: poly mesh cells are an MSET >= 8 only feature 2024-09-03 10:57:54 +02:00
Kawe Mazidjatari
6fd2d41856 Recast: fix traverse link generation for type '1'
Should overlap on both sub-edges before the link gets established. Avoids the AI getting stuck in game when they don't.
2024-09-03 10:56:51 +02:00
Kawe Mazidjatari
807a327b6f Recast: fix compiler warnings caused by unused local variables 2024-09-03 01:52:22 +02:00
Kawe Mazidjatari
afab9c2206 Recast: fix crash in dtPathCorridor
Must alloc the jumpTypes array, currently not fully implemented yet.
2024-09-02 18:02:47 +02:00
Kawe Mazidjatari
652d8f9da0 Recast: remove invert parameter from rdCalcEdgeNormal*
Extraneous parameter.
2024-09-02 17:26:16 +02:00
Kawe Mazidjatari
603878d413 Recast: fix heap buffer overflow in createPolyMeshCells
Must iterate up to num detail tris for current detail mesh instead of total detail tris for entire tile mesh.
2024-09-02 17:17:21 +02:00
Kawe Mazidjatari
ec741313c2 Recast: fix stack corruption caused by out-of-scope variable usage
pmin and pmax pointed to these stack arrays, but these stack arrays were inside the loop while pmin and pmax, along with their usages were outside the scope of the loop causing undefined behavior when they pointed to the currently out-of-scope stack variables. Moved the arrays outside the loop so they remain valid up to the last point they are needed.
2024-09-02 15:40:29 +02:00
Kawe Mazidjatari
3e56daf398 Recast: properly handle out-of-memory situations during build
Return false if createBVTree or createPolyMeshCells fails as a result of memory allocation failure rather than crashing the application.
2024-09-02 15:36:23 +02:00
Kawe Mazidjatari
7071de1643 Recast: BVTree build bug fix and large optimization
dtMeshHeader::bvNodeCount is always set to polycount*2, but when we have null bv nodes, then these will also be used during dtNavMeshQuery::queryPolygonsInTile, which can yield incorrect results when the null nodes overlaps query box. Also added an additional optimization to only store non-null BV nodes which can save a significant amount of memory during the runtime. After this bug fix and optimization, the resulting mesh still works as intended in-game.
2024-09-02 15:20:59 +02:00
Kawe Mazidjatari
05cc26dfe5 Recast: tag semi and fully unlinked tiles with userid's
Fully unlinked can be removed entirely, semi unlinked needs a rebuild to remove unlinked polygons (still work in progress). Added ability to automatically remove fully unlinked tiles.
2024-09-02 12:25:15 +02:00
Kawe Mazidjatari
e315b8d36f Recast: move fine tuner under collapsing header
UX improvements.
2024-09-01 00:02:28 +02:00
Kawe Mazidjatari
66cf9678d2 Recast: add method for marking cells as occupied 2024-09-01 00:01:51 +02:00
Kawe Mazidjatari
3227208533 Recast: fix signed/unsigned mismatch 2024-08-31 23:40:21 +02:00
Kawe Mazidjatari
ec115d7c97 Recast: start of jump type implementation in findStraightPath 2024-08-31 23:03:44 +02:00
Kawe Mazidjatari
ab88364779 Recast: fix comment location 2024-08-31 15:59:36 +02:00
Kawe Mazidjatari
b39214e517 Recast: check for traverse filter in dtNavMeshQuery::moveAlongSurface 2024-08-31 15:58:57 +02:00
Kawe Mazidjatari
14225dccc1 Recast: optimizations for getPortalPoints
Don't loop over the linked list again to find the corresponding link while we already have a pointer to it.
2024-08-31 15:58:28 +02:00
Kawe Mazidjatari
54f1e217de Recast: start of navmesh query modifications
Start of implementing changes of Titanfall 2 and Apex into dtNavMeshQuery.
2024-08-31 15:13:24 +02:00
Kawe Mazidjatari
7fb9a2d48b Recast: fix typo in function name 2024-08-31 11:57:09 +02:00
Kawe Mazidjatari
09a052ff18 Recast: tag unlinked and unusable tiles
Don't add tiles with no links to the position lookup table.
2024-08-31 11:54:09 +02:00
Kawe Mazidjatari
537f149be3 Recast: fix compile error
This function was removed in commit 041d02cd654d94bf4b059c212cb6a63a39e5324e but it should've been kept in as it was still used for dtNavMeshQuery::findRandomPointAroundCircle. Only the quantizer should be removed.
2024-08-30 15:54:30 +02:00