4712 Commits

Author SHA1 Message Date
Kawe Mazidjatari
46e2424bb2 Engine: increase default stringcmd quota to 32
16 was causing the clients to get kicked when they hover and moving their cursor over the characters in character select very fast. The scripts tell the server to update the view to other clients but unfortunately the system relies on string commands (ClientCommand) and is pending a rewrite to incorporate a proper RPC just like Server and UI has. For now we increase the limit to 32 as 32 is still outside the exploitable range when the game is ran without dev tools enabled.
v2.5_r3
2024-11-12 02:08:40 +01:00
Kawe Mazidjatari
4aee1e707c CPylon: fix bug in GetServerByToken
Field name and field type were incorrectly set, GetServerByToken only returns 1 server and is always an object but it was always treated as an array of servers. Fixed field name and field type.
2024-11-12 00:14:08 +01:00
Kawe Mazidjatari
24e731e4ee ThirdParty: upgrade l8w8jwt library to 2.4.0
Security fixes.
2024-11-12 00:10:46 +01:00
Kawe Mazidjatari
e5d7644d19 Common: add missing comment to OOB message ID
The only out-of-band message ID that lacked a comment explaining what it is.
2024-11-11 20:32:53 +01:00
Kawe Mazidjatari
b16985ee0c Tier0: bump game sdk version to 012
Force new version on master server.
2024-11-11 20:27:59 +01:00
Kawe Mazidjatari
0a0c99ba77 Tier0: bump sig cache version to 0x2E
Force full rebuild of RVA cache.
2024-11-11 20:27:30 +01:00
Kawe Mazidjatari
35b23915d3 Common: reverse engineer last OOB message ID
Out-of-band message ID 'N' is MatchInfo update (calls CHLClient::RemoteMatchInfoUpdated() which then calls UICodeCallback_RemoteMatchInfoUpdated. The RemoteMatchInfo data can be retrieved through script function GetRemoteMatchInfo()).
2024-11-11 20:22:19 +01:00
Kawe Mazidjatari
9a9e84f974 Tier0: fix compiler specific compile error
This code doesn't compile on VS2017 15.6 (does on 2019 and above). We also don't need to ABS; removed the ABS code as the code is currently only used for unsigned types and we probably do want to take the sign into account when getting mins/maxs from signed values too. If not then this could always be ABS'd by the caller to explicitly set the behavior.
2024-11-11 19:50:01 +01:00
Kawe Mazidjatari
a809b1f262 Server: remove exraneous client pointer check
CServer::GetClient() will never return NULL as it returns address of client in array. Removed extraneous checks as its misleading, and added const where possible.
2024-11-11 17:47:36 +01:00
Kawe Mazidjatari
5ed734a4ff Client: fix controller curve look
The rebuild was wrong, the reported issue was that during auto-aim, the rotation speed is higher than original with a weaker magnet. Since the dissasembly and decompile of this function wasn't correct, along with not being able to reproduce the issue locally, it was hard to debug the problem (the difference between the rebuild and the original implementation was very small, where only experienced players noticed it). Since I have concluded that we don't need this function rebuilt as nothing else in the function needed adjustments, we can therefore just hook it and add the multiplication scalars on the computed joy angles. This now seems to yield correct behavior based on new tests that were performed with these changes.
2024-11-11 17:39:53 +01:00
Kawe Mazidjatari
5e962d6eb0 Loader: update SDK loader documentation
The loader no longer loads from WinMain as this caused problems during shutdown. It was switched back to LauncherMain with several adjustments to make it work perfectly for both initialization and shutdown.
2024-11-11 13:56:01 +01:00
Kawe Mazidjatari
50b4c559c6 Pylon: light cleanup of GetBannedList
Logic remains unchanged, just unscoped the iteration code by inverting the check for whether the array is empty.
2024-11-11 00:14:25 +01:00
Kawe Mazidjatari
c1ca886ee5
Merge pull request #131 from O-Robotic/p4sync
Pylon: Fix incorrect return value in GetBannedList
2024-11-10 23:51:12 +01:00
O-Robotic
cce4429606 Pylon: Fix incorrect return value in GetBannedList
GetBannedList was returning true even when no players were pushed to the banlist causing excessive thread creation in the bulk check system.
2024-11-10 17:00:23 +00:00
Kawe Mazidjatari
0806b10f79 Recast: delay sub-edge area calculation
Optimization by only calulcating it when its used to avoid calculating it for nothing when we end up moving to the next edge. This is only used when the link is established.
2024-11-10 14:28:10 +01:00
Kawe Mazidjatari
427860e6e9 InputSystem: add option to run the old CurveLook implementation
The rebuild should be correct, but to rule out any problems we might have after releasing this build, we should have a simple option to force the old implementation.
2024-11-10 14:02:49 +01:00
Kawe Mazidjatari
c72e34606b Server: only run the loop if we have an attached NavMesh 2024-11-10 12:27:14 +01:00
Kawe Mazidjatari
bca3a595e5 Pylon: enforce consistency in schema v2.5_r1 v2.5_r2 2024-11-09 14:05:41 +01:00
Kawe Mazidjatari
2513d9e70e Tier0: bump game sdk version to 011
Force new version on master server.
2024-11-09 03:04:45 +01:00
Kawe Mazidjatari
913b36d225 Tier0: bump sig cache version to 2D
Force full rebuild of RVA cache.
2024-11-09 03:04:00 +01:00
Kawe Mazidjatari
f7d75dd25f Resource: add offline autoexec file
Add to resources, refer to commit 43e162711e94293935e5eacf017c6cd0fa4c948b for details.
2024-11-09 01:26:12 +01:00
Kawe Mazidjatari
9968769e37 Core: update launch emblem
Updated to v2.5.
2024-11-09 01:23:09 +01:00
Kawe Mazidjatari
43e162711e Core: add option to run the game fully offline
The game can now be ran fully offline by providing '-offline' to the command line arguments. The engine will auto execute 'system/autoexec_offline.cfg' which overrides other autoexecs to ensure the game runs offline. The system/autoexec_offline.cfg file only overrides the variables it sets.
2024-11-09 01:22:43 +01:00
Kawe Mazidjatari
a702323181 Pylon: add option to fully disable matchmaking server connection
Fully disable the system if pylon_matchmaking_enabled is false.
2024-11-09 01:19:23 +01:00
Kawe Mazidjatari
0ad88c6ae5 EbisuSDK: add const qualifiers 2024-11-09 01:12:33 +01:00
Kawe Mazidjatari
d0ec49cc52 RTech: fix resource leak
CustomPakData_t::numHandles was never decremented on unload, causing pakId == PAK_INVALID_HANDLE to be true and triggering the assert. Due to this, we either never unload resources properly on subsequent unloads and loads, or we would run out of pak slots as numHandles will reach MAX_CUSTOM_PAKS. Also added a comment explaining why this loop isn't ran in reverse.
2024-11-08 21:51:04 +01:00
Kawe Mazidjatari
a6a4e76677 Recast: allow keeping unlinked polygons
The prune code will prune everything marked unlinked, but unlinked means that that polygon doesn't link to another, it doesn't mean its useless. Therefore, if we have an island that is unlinked, but still want to keep it, we should be to. The polygon should only be considered dead when its unlinked and disabled, which only happens through the prune tool. This allows for pruning and cleaning single polygon navmeshes.
2024-11-08 21:47:58 +01:00
Kawe Mazidjatari
bfda37300c Recast: allow for fully disabling poly cells
Setting it to 0 fully disables it, clamped from 0 to 128 now.
2024-11-08 21:44:11 +01:00
Kawe Mazidjatari
23c0e87735 Recast: fix navmesh defaults
Should've been part of commit 0a11ffce70ac0b306be3f1993e611991268ed0f5.
2024-11-08 21:43:29 +01:00
Kawe Mazidjatari
7bd90f191e Recast: fix typo in dtHint struct
dtHint::triangle should be triangles as it can contain more than one triangle, renamed it to 'tris' to keep consistency with the rest of the code base. Also fixed its comment explaining what its size is.
2024-11-08 21:42:31 +01:00
Kawe Mazidjatari
a7086a600a Recast: add const qualifier to dtNavMesh::arePolysAdjacent 2024-11-08 20:08:12 +01:00
Kawe Mazidjatari
0a11ffce70 Server: document AI hull variables
Add more comments to describe what they do, Hull_s::scale is now confirmed to be extentScale as the game uses this to query points on the NavMesh, its also being used to build navmeshes based on the tile headers in Titanfall 2 navmeshes and their hull constants.
2024-11-08 20:06:05 +01:00
Kawe Mazidjatari
899efb902f Client: improve navmesh hot swap button text
Make it more consistent with other buttons.
2024-11-08 20:01:06 +01:00
Kawe Mazidjatari
ff33a19b85 Recast: move triangle intersection code to shared
Light cleanup and reusability.
2024-11-06 21:37:07 +01:00
Kawe Mazidjatari
ce0fa2028f Recast: rewrite triangle intersect code and increase chunk index buffer
There was a bug where some rays went through triangles, albeit rare. The issue was that overlapping chunk indices were truncated if the number exceedes the maximum of the stack buffer. The intersection code was originally also written to ignore back faces, but we need back faces, the intersection code has been rewritten with a known robust algorithm and the index buffer has been increased and made static. The rays no longer go through triangles.
2024-11-06 21:27:18 +01:00
Kawe Mazidjatari
cd78e5afa9 Recast: fine tune navmesh rasterization parameters
These new values give better results after commit 247a99765ce669434513558e44bba632a55135d1 and b41141018e9be3c28cdbc74d1fc7e3b8ec876c6d. The new cell heights can be used after we fixed the culling of neighbor spans. For the larger tile size: since we can only reliably link to neighbor tiles we need to increase the tile size to ensure full traverse link coverage. Respawn by default uses 512x512 tiles, however, given that a link can be as large as 2550.0 in world units, a tile size of 1024x1024 in the x-y plane should give more than enough room to connect links to their fullest extends to neighboring tiles when we also take the Z into consideration. This change greatly benefits traverse types that perform "ACCROSS" activities, e.g. flat traverse links.
2024-11-06 14:50:47 +01:00
Kawe Mazidjatari
247a99765c Recast: add option to disable the filtering of neighbor slopes
This causes many problems in titanfall and apex maps due to the large voxel sizes we have to use to generate navmeshes. A single unwalkable voxel makes a large difference. disabling these feature results in much better results. The problems this test filters away can be fixed with setting proper cell heights in our case.
2024-11-06 14:44:06 +01:00
Kawe Mazidjatari
40cea14a49 Recast: return out early if we have no spans
All code below this will fail anyways as they rely on span count which can be null.
2024-11-06 14:28:49 +01:00
Kawe Mazidjatari
bef18681cf Recast: return out early if we have no regions 2024-11-06 14:27:11 +01:00
Kawe Mazidjatari
eb6692ab9e Recast: fix heap buffer overflow in partitioning code
Fixes https://github.com/recastnavigation/recastnavigation/issues/317. This can happen when we mave multiple spans in the X row. So far this crash only occured in Capitol City in Apex Legend's Worlds Edge map, where there are internal polygons in high rise buildings with 10 or more floors equally placed on top of another.
2024-11-06 14:24:14 +01:00
Kawe Mazidjatari
851ae9c75f Recast: fix typo in parameter name
After coordinate system conversion, this shouldb e X-Y.
2024-11-06 14:17:30 +01:00
Kawe Mazidjatari
652b5d7018 Game: make navmesh render plane culling optional
Plane culling is too aggressive on larger tiles, make it optional.
2024-11-06 14:12:12 +01:00
Kawe Mazidjatari
c4cdbe38ce Recast: increase max span height bits
Increase to 29 bits for span limits, previously this was 13 and since the next field in the struct was a pointer, we end up using the 4 bytes padding so the struct size didn't increase. The reason for this increase is that rcSpan::smin and rcSpan::smax overflow when building a navmesh with a low cell height. This is especially an issue with maps that contain mountains. For the season 1 kings canyon map, the tiles containg the polygons for the firing range will be entirely flat due to the massive height difference between the base map and the firing range which resides under the map, causing it to be clamped to the previous MAX_HEIGHT value.
2024-11-05 02:06:06 +01:00
Kawe Mazidjatari
5e36f58956 Recast: add toggle to disable automatic traverse link building 2024-11-04 22:10:42 +01:00
Kawe Mazidjatari
3e5540e762 Recast: improve traverse type parameters
Slightly more fine tuned for better results, especially between type 10 and 21, make AI climb on lower ledges and perform higher jumps on higher ledges. Also ensured full coverage for all "accross" traverse activities by closing all min/max distance gaps.
2024-11-04 20:57:37 +01:00
Kawe Mazidjatari
98ed726cb4 Recast: always start from north during traverse linkage
During new tests, not starting from the neighboring tile at north caused some smaller links to not establish, which is roughly 30 links in angel_city.bsp. This patch makes it always start from north without any alternation and yields the best results during all tests.
2024-11-03 16:52:01 +01:00
Kawe Mazidjatari
065150158a Recast: small optimization for traverse link algorithm
Only calculate edge directions and normals when we are sure this is going to get used.
2024-11-03 15:36:09 +01:00
Kawe Mazidjatari
3e7c7cb7da Recast: fix incorrect base side classification
rdClassifyDirection never got intercardinal sides causing it to be unreliable and inaccurate. rdClassifyPointInsideBounds and rdClassifyPointOutsideBounds are tested and confirmed correct during every case, switched use to rdClassifyPointInsideBounds instead and removed rdClassifyDirection for the start side of the neighbor tile lookup. For the links: the base side is always the opposite of the land side.
2024-11-03 15:33:44 +01:00
Kawe Mazidjatari
d0a8549dc9 Recast: change return type of tile side getters to unsigned char
Value will never be higher than 7 as we only have 8 sides (0-7). Avoids having to cast as dtLink::side is an unsigned char.
2024-11-03 15:21:25 +01:00
Kawe Mazidjatari
b4e7bb7886 Recast: never attempt link to the same polygon
Big optimization as you cannot link to the same polygon, you also cannot link to the same triangle. This drops polyCount number of iterations on polygons per tile.
2024-11-03 15:16:10 +01:00