3759 Commits

Author SHA1 Message Date
Kawe Mazidjatari
ad44b3f010 Recast: variable name cleanup and improve documentation
Renamed variables to accommodate the XZ -> XY change. Also fixed a dead URL to point to an archived version to maintain documentation.
2024-07-02 00:59:17 +02:00
Kawe Mazidjatari
a99b9cc850 Recast: fix unflipped edge verts in mesh detail
Edge verts were checked to the incorrect ones in findEdge and overlapEdges, edge verts have been flipped. Also added note for tri flipping in rcMergePolyMeshDetails (this function is currently unused, but if it ever gets used, the note's should be confirmed).
2024-07-02 00:56:20 +02:00
Kawe Mazidjatari
288c36bd5e Recast: fix variable names in rasterizer
Column cell indices are obtained through xy now instead of xz, adjusted variable names.
2024-07-01 16:49:00 +02:00
Kawe Mazidjatari
a2d5d52dc4 Recast: fixup tile mesh building to avoid post transformation
Properly flip edge vertices during the build. This also reduces the final mesh size, and significantly reduced the reachability table size (static pathing).
2024-07-01 16:47:49 +02:00
Kawe Mazidjatari
bc94f59439 Recast: duDebugDrawGridXY cleanup
Renamed duDebugDrawGridXY_TF2 to duDebugDrawGridXY and removed the old implementation of duDebugDrawGridXY.
2024-07-01 13:24:43 +02:00
Kawe Mazidjatari
8b51403310 Recast: fix camera movement bug (XZ -> XY)
Up/down should be applied to the Z axis.
2024-07-01 13:23:06 +02:00
Kawe Mazidjatari
2896dc0d37 Engine: fix code bug when running "uiscript_reset" during init or load screens
Make sure this command cannot be executed before the UI VM is initialized or during load screens, doing so will hard crash the engine.
2024-07-01 01:30:01 +02:00
Kawe Mazidjatari
fea8603258 ImGui: add shortcut button for reparsing all scripts
The "Reparse all scripts" button reparses every script file, and reloads/reconnects the game.
2024-07-01 00:25:31 +02:00
Kawe Mazidjatari
a1bd8bd012 Engine: add reconnect logic and concommand for client
Allow the user to reconnect to a server by running 'reconnect', this also allows for reparsing all client side scripts while debugging the game on a dedicated server.
2024-07-01 00:20:03 +02:00
Kawe Mazidjatari
7ba2d2caf5 Recast: fix trailing extension delimiter on model names when loading .gset files
The code assumed an extension of 3 characters, but .gset is 4 and is also supported, causing a trailing '.' as it only truncates the training 4 characters (including the null char). The code now searches for the extension delimiter and gets the actual model name regardless of the length of presence of an extension.
2024-06-30 21:57:26 +02:00
Kawe Mazidjatari
6a57cea9ef Recast: save off-mesh connection reference positions and yaws to geometry sets
Allow storing and loading of additional off-mesh connection data (newly added for titanfall and apex).
2024-06-30 18:36:51 +02:00
Kawe Mazidjatari
1e9363f9eb Recast: draw poly centers 2024-06-30 17:42:46 +02:00
Kawe Mazidjatari
74c0017c85 Recast: also draw off-mesh connection reference positions in editor mode 2024-06-30 17:42:32 +02:00
Kawe Mazidjatari
cc73d147fc Recast: implement off-mesh connection yaw angles and reference positions
Used by the engine for AI wall running, but also other AI logic like move direction. This probably is some cached ref pos + yaw to save on computation in the runtime, and probably used to lerp the AI to the correct direction before jumping. Current implementation seems very close to original navs now, though, the original navs appear to have some yaw angles being rotated a bit, probably manual adjustments to make the AI face a wall that isn't perpendicular.

Also implemented debug drawing for the new ref positions, and made the start circle of the off-mesh connection red, and the end position green to make it easy what is what in bidirectional connections.
2024-06-30 17:36:01 +02:00
Kawe Mazidjatari
bff157bbb4 Server: add AI Hull enumeration
All AI hulls of the game
2024-06-30 16:12:53 +02:00
Kawe Mazidjatari
2b80341c51 Server: fix server entity structs
The sizes were correct, but some of the field offsets weren't. CBaseCombatCharacter also contained fields specific to CPlayer, these have been moved to CPlayer. CBaseCombatCharacter now aligns on all classes deriving from it (CAI_BaseNPC, etc..). Classes now align properly in the disassembler. Also added more static assertions to prevent mistakes.
2024-06-30 16:11:16 +02:00
Kawe Mazidjatari
b491abb5ec Recast: move pointers out of dtQueryData
A mistake was made thinking this was part of the struct, but the real change is that m_queryFilter is static in r5 rather than a pointer. Changing this in Recast is a big change however; reverted changes made in 1255629fcf5a0b0ca2140309ca891c79e2f24738 and 9049e61d34cb3f52627b8ca10f1b7da21e147ad9.
2024-06-27 14:41:18 +02:00
Kawe Mazidjatari
1255629fcf Recast: fix dtNavMeshQuery regression
pointers were also nulled during the memset after the move to the dtQueryStruct in commit 9049e61d34cb3f52627b8ca10f1b7da21e147ad9. Created dedicated 'Reset' method.
2024-06-27 13:35:13 +02:00
Kawe Mazidjatari
baa3d8f878 Recast: fix cmake debug options
Program is no longer called 'naveditor.exe', assigned to-debug program name to project name.
2024-06-27 13:21:22 +02:00
Kawe Mazidjatari
47a0b179cd Tier1: add xorstr tools 2024-06-27 11:08:40 +02:00
Kawe Mazidjatari
aa3e33a497 Engine: flip lump loading check
Make it more obvious what we are loading and what not (instead of checking if its client only, check if the server should load it since the client needs everything). This will also make sure that we never load other lumps even if they are present in the VPK or disk (they aren't for dedi builds).
2024-06-27 00:07:58 +02:00
Kawe Mazidjatari
2c94c9907d Tier0: extra malloc override constification 2024-06-26 00:37:36 +02:00
Kawe Mazidjatari
a2acc45c5e Tier0: remove extraneous memset in '_recalloc_base'
CStdMemAlloc::Realloc already nulls memory, no need to memset it.
2024-06-24 00:34:16 +02:00
Kawe Mazidjatari
ec44837022 Server: add static asserts for node graph structs
Make sure they don't change in size, else the AI node graph file becomes invalid.
2024-06-17 15:46:06 +02:00
Kawe Mazidjatari
4b67f4c27e Client: add reverse engineered Input interface
IInput and CInput interfaces reverse engineered.
2024-06-17 15:29:56 +02:00
Kawe Mazidjatari
155bfd5be3 InputSystem: remove legacy code
InputSystem's interface has been reverse engineered already, the old placeholder interface is no longer needed.
2024-06-17 15:27:46 +02:00
Kawe Mazidjatari
06faf1963a Server: finish reversal of struct 'CAI_ScriptNode'
The 2 fields are actually a CBitVec of 64 bits, which under the hood is split into 2 32bit unsigned integers. Type reversed from abstracted script functions 'NavMeshNode_GetBooleanData' and 'NavMeshNode_GetBooleanData'.
2024-06-17 15:25:27 +02:00
Kawe Mazidjatari
358a2c4bf0 Engine: improve naming convention for RCON
Make it more consistent with the rest of the SDK. Nothing logic wise has been changed in this patch.
2024-06-17 15:24:08 +02:00
Kawe Mazidjatari
e34d4b9456 Thirdparty: upgrade SpdLog to 1.14.1 2024-06-17 15:21:49 +02:00
Kawe Mazidjatari
40be9da7a2 InputSystem: add IInputStackSystem interface
Interface is used in  commit fb8ef4f37964adf3d5128ccd98bff136af75e9bb.
2024-06-16 20:34:20 +02:00
Kawe Mazidjatari
fb8ef4f379 InputSystem: add reverse engineered 'InputStackSystem' class
Reverse engineered as part of reverse engineering class 'CInput' which is for a future commit. Singleton pointer has been exposed to SDK through the pointer 'g_pInputStackSystem'.
2024-06-16 20:32:57 +02:00
Kawe Mazidjatari
a165534b3c InputSystem: implement GetAttachedWindow()
No longer virtual in r5, but is still needed; reimplemented.
2024-06-16 20:27:05 +02:00
Kawe Mazidjatari
e10981821b Tier1: add utility class 'CUtlStack' 2024-06-16 20:26:10 +02:00
Kawe Mazidjatari
88ef6fdd8b VScript: add partially reversed 'SQClass' type 2024-06-16 20:24:00 +02:00
Kawe Mazidjatari
ea4d31c26d VScript: fix buffer overflow vulnerability in SQClass::NewSlot()
Assembly patch in game executable to implement the fix from commit 23a0620658 - patch has been tested and confirmed working.
2024-06-13 15:52:03 +02:00
Kawe Mazidjatari
61856106f0 NetworkSystem: fix regression in eula schema
During port to new performant JSON utils system in commit a5e05d3996ae95876fcac09affeaa043a768e749, the typo was made causing EULA not to display during tests. Fix field name typo.
2024-06-11 16:42:59 +02:00
Kawe Mazidjatari
a3e021d637 VpkLib: fix typo in error message
Should be chunk buffer, not block buffer; chunk is a part of a file (who's buffer is getting allocated here), block refers to the entire VPK data file.
2024-06-11 14:34:50 +02:00
Kawe Mazidjatari
27edaaf653 VpkLib: improve error and warning messages
Slightly more specific.
2024-06-11 14:13:08 +02:00
Kawe Mazidjatari
e59490a324 Resource: update launcher icon
Slight adjustments to 32x32, incorrect vector used for that resolution.
2024-06-11 14:08:22 +02:00
Kawe Mazidjatari
a5e05d3996 NetworkSystem: significant performance improvements
Now uses new JSON member lookup utilities implemented in commit f6e93ee457876ce869ce04067fe9344ff81083ca. All lookups (typically 3 per member) have been reduced to 1 by caching and reusing all value pointers or iterators. Also added error strings for 2 missing error cases in CPylon::GetEULA(), previously it would only set the error string during fetch error, but not when the data is missing or the schema is incorrect.
2024-06-11 10:16:16 +02:00
Kawe Mazidjatari
f6e93ee457 Tier2: create json utilities for performance
This will be used to improve performance on the current RapidJSON implementation in the SDK by cutting out a lot of common operations (such as checking if a var exists and then getting it by name, automatically creating 2 expensive lookups).
2024-06-11 09:55:10 +02:00
Kawe Mazidjatari
03cc2daf8c Resource: add new icons for game and launcher executable
New images are remade with vector assets to improve the quality on all resolutions of the icons. Previous ones reportedly looked pixelated/distorted on lower DPI's. Icon's contain resolutions for all Windows editions starting from Windows 7 until Windows 11.
2024-06-10 21:48:41 +02:00
Kawe Mazidjatari
23f34715c4 Client: add cvar for in-game ui
Will be used in script for menu's
2024-06-09 14:10:17 +02:00
Kawe Mazidjatari
501c6bd512 Engine: add ConCommand for re-logging installed netkey
Some users complained about not being able to practically retrieve the installed netkey from the application's console as it bets buried under newer logs (and eventually cleared). This ConCommand allows the user to query the installed key without having to look through session logs.
2024-06-07 22:34:50 +02:00
Kawe Mazidjatari
cb064ca2ce
Update README.md
Improve formatting.
2024-06-06 11:12:05 +02:00
Kawe Mazidjatari
914b715bf2
Update README.md
Improve formatting.
2024-06-06 11:10:08 +02:00
Kawe Mazidjatari
b5f75876a7
Update README.md
Update debug instructions (see #116).
2024-06-04 11:59:03 +02:00
Kawe Mazidjatari
328d88213c Miles: fix voice comm bus regression
Regression was caused in commit 3bb4ee625863c1dd503f07e0d480f4b3fd302c48. The new sound engine has breaking changes in its exports. Added shim layer to fix incompatibilities on the export 'MilesSampleSetSourceRaw'.
2024-06-01 02:23:55 +02:00
Kawe Mazidjatari
b25f5b181f Tier1: only set overflow flag if it hasn't been set already
Only set overflow flag in 'CBitRead::GrabNextDWord()' if it hasn't been set already, code now matches the assembly of the game executable.
2024-05-31 14:55:47 +02:00
Kawe Mazidjatari
b5f166085d Engine: mark cvar 'fps_max' as FCVAR_ARCHIVE
The new scripts now show a dedicated FPS limit option in the video settings, there is also a demand for having this cvar to persist its value. Marked as FCVAR_ARCHIVE so it gets saved to user profile settings.
2024-05-31 14:03:04 +02:00