412 Commits

Author SHA1 Message Date
Kawe Mazidjatari
b99f310198 Parsing Titanfall 2 AIN's now fully works
The AIN structure, including the in-memory structures seem identical to Titanfall 2. I mapped quite a few 'CAI_Network' related functions out and everything seems to line up. But I haven't figured the script nodes out (yet), but looking at this, it seems like they got completely stripped? TODO..

I also found where it creates nodes/links from input NavMesh, the poly structure also seems identical to Titanfall 2, but still haven't found where this extra field gets used.
2022-03-21 00:28:14 +01:00
Kawe Mazidjatari
92edf22b07 The beginning of SaveAINFile 2022-03-20 17:03:46 +01:00
Kawe Mazidjatari
9b33e1b94e Fix more debugdraw 2022-03-19 12:56:22 +01:00
PixieCore
4330b8064b Fixed "mat_crosshair" callback.
Not registering a new command anymore. Instead we fix mat_crosshair.
2022-03-18 22:45:12 +01:00
PixieCore
9476897018 Forgot to add namespace on datatype. 2022-03-18 21:39:55 +01:00
PixieCore
8a672f4dfc CMaterialGlue changes.
Discovered new potential names for class vars.
2022-03-18 21:38:57 +01:00
PixieCore
96ee0a834d Added DXTexture fields to CMaterialGlue 2022-03-18 20:13:28 +01:00
PixieCore
0c9e184e3f GetMaterialAtCrossHair changes, CMaterialGlue changes.
CShaderGlue still needs to be reverse engineered.
CMaterialGlue still needs verification for S0-S2 to see if the struct matches.

Patterscanning GetMaterialAtCrossHair now.
2022-03-18 18:34:27 +01:00
PixieCore
627b25c120 Initial implementation of CMaterialGlue.
Some GUID's are still unknown.

Class members need verification like the material resolution member.

Added a ConCommand for getting the material we are currently looking it and printing it to the console.

Porting to other seasons still need to be done.
2022-03-18 13:47:22 +01:00
Kawe Mazidjatari
35ad8554a5 Somewhat correct working navmesh
The reachability table needs to be figured out still. The issue should be very small, but at the moment I do not have time for it.

The pointer to the table, and table pointers to data is correct, however, not a single poly is ever getting marked as 'reachable' (0xffffffff). This could be either within recast itself (see build_link_table() and set_reachable() functions), or the way the engine parses the data. The function that determines whether poly is reachable is located at '0x140F448E0'
2022-03-18 03:14:07 +01:00
Amos
9f24bc01b0 Update sv_rcon.cpp 2022-03-16 02:04:45 +01:00
Amos
8f7a3ef336 Small improvements 2022-03-16 02:03:06 +01:00
Amos
8202c8fc6c Small improvement 2022-03-16 01:38:00 +01:00
Amos
1cc71342e8 Fix compile for clang-cl
Uncomment when this needs to be debugged again
2022-03-16 01:37:45 +01:00
Amos
7e24c31e94 Forgot this one 2022-03-16 01:36:57 +01:00
Amos
c7b4c939b3 Fix warning when trying to delete old binary post build for copy 2022-03-16 01:36:28 +01:00
Amos
2fb7aef885 Update Pch.h 2022-03-16 01:35:42 +01:00
Amos
7596f44655 Fix alignment 2022-03-16 01:35:29 +01:00
Amos
243c5e4af7 Fix cylinder debug draw 2022-03-16 01:33:58 +01:00
Amos
7cd73893f4 Build navmesh files to game directory
And additional compiler improvements
2022-03-13 22:20:02 +01:00
Amos
3cf36b5d61 Increase compile performance even more for NavMesh Editor
Cleaned up redundant includes
Reordered required ones
2022-03-13 03:00:07 +01:00
Amos
b3f064d009 Create precompiled header for NavMesh Editor and restructure project filter 2022-03-13 02:22:55 +01:00
Amos
bbf37b93c8 Copy netconsole and navmesh editor to 'bin' folder instead 2022-03-13 01:23:53 +01:00
Amos
d71b949468 Add Recast & Detour navmesh editor to SDK 2022-03-13 01:15:52 +01:00
Amos
ee51613492 Add libsdl library to project 2022-03-12 15:38:52 +01:00
Amos
ac94f4fd68 Add Recast & Detour libraries to project
Libraries taken from https://github.com/r-ex/r2recast/tree/apex_legends
2022-03-12 15:11:32 +01:00
Amos
24cd3aa2d5 Small improvements 2022-03-12 13:19:31 +01:00
Amos
faac1232be Make run on S1 again 2022-03-07 13:15:45 +01:00
Amos
ff06cb71eb Fix build for S1 2022-03-07 11:36:45 +01:00
Amos
16f2bbc45c Adapt even more to new log system 2022-03-07 11:32:12 +01:00
Amos
84db6e73db Remove extraneous build configs 2022-03-04 16:23:05 +01:00
Amos
cf92d64a27 Use unicode character set instead of multi-byte 2022-03-04 16:06:36 +01:00
Amos
2fee28ae96 Adapt to new loggers 2022-03-04 15:59:33 +01:00
Amos
6e4a4bde2f Implement SQVM error rebuild in engine with new Warning and Error loggers 2022-03-04 15:34:09 +01:00
Amos
1058a6fa10 Use unicode character set instead and light cleanup/bug fixes 2022-03-04 12:22:17 +01:00
Amos
4a0772bd18 Cleanup completion functions
Use actual CCommand class instead of offsets to members + reduced comments of self explanatory function names now that we use the class instead.
2022-03-02 02:03:46 +01:00
Amos
8e1953cc8d Load STBSP file specified in prereq file
The game now loads a override STBSP file for the BSP if field 'stbsp' in level prereq settings is populated.
2022-03-02 01:16:35 +01:00
Amos
fa8c9be8cc Small adjustment 2022-03-02 01:14:36 +01:00
IcePixelx
2d4c6c7f68 fixing CalcPropStaticFrustumCulling up. 2022-03-01 22:49:57 +01:00
Amos
6583e174de Implement custom paks loading per level
Game will check scripts/levels/mapname.json and load all rpaks in the rpak field.
Game now also unloads pak files loaded by the SDK preventing crashes and unnecessary memory usage.

VPK's and STBSP's are planned to be added as well.
2022-03-01 02:39:46 +01:00
Amos
0509fb0358 Cleanup all redundant empty control statements 2022-02-28 01:05:55 +01:00
Amos
2719a85504 Debug overlay QOL improvements + Con_NPrintf() hook
* Added ability to invert rect to calculate offsets from bottom/right as well so debug text doesn't get out of view, or obstruct view when window is resized.
* Added Con_NPrintf() hook which shows detailed systems running times and VGUI panel debug information.
2022-02-28 01:01:40 +01:00
Amos
0774ebf9ff Fix exception during SDK shutdown
Run in a fixed interval manner within same thread instead of separate threads.
2022-02-27 19:47:29 +01:00
Amos
62604e8fe9 CAI related stuff (see description)
* Partially rebuild CGlobalVarsBase and CGlobalVars struct.
* Partially implement BuildAINFile (disk builder) written by BobTheBob9. All that needs to be found are the addresses/offsets for 'pUnkStruct0Count' and 'pUnkLinkStruct1Count' (see ai_node.h). I didn't have time for it yet.
* Patch call which restarts the engine once AIN file has been build (so it doesn't get cleared from memory).
* Temporarily patch write operation in 'Detours_LevelInit()' which writes out of scope since the navmesh structure is misaligned somewhere still with a few bytes.

NOTE: 'CAI_NetworkBuilder::BuildFile()' is for now commented out until the 2 other structs are found in the game dll. Once found then we could start fixing the struct offsets and hope it works as-is.
2022-02-27 03:15:00 +01:00
Amos
92c0c61450 Remove screen width/height from debug configuration files 2022-02-24 16:47:08 +01:00
Amos
dc6e0a3613 Fix client script error causing crash 2022-02-24 16:46:38 +01:00
Amos
23f37bfa50 RCON QOL improvements 2022-02-24 16:44:33 +01:00
Amos
fdb6663c91 Heavily reduce what is needed from protobuf (lite implementation) 2022-02-24 12:47:18 +01:00
Amos
d12bf39dea Fix SQVM error for dedicated 2022-02-24 02:17:05 +01:00
Amos
3616b85f6a Some fixes and new features, see description.
* Add CServerGameDLL interface to SDK (unfinished)
* Inline all CHostState members. Calling discrete member functions will result in a corrupt stack. It also alters with the VTable layout in the engine since we assign our SDK instance directly to it. Forcing everything to be inline (like the assembled counterpart within the executable itself) will ensure no virtual calls will get created and misalign the base VTable.
* Patch SQVM_CompileError to call SQVM_Error with the severity flag set to false (0 = do not terminate process, 1 is terminate process).
2022-02-24 01:51:11 +01:00