* Promoted size types in CUtlBuffer to int64.
* Fixed bug where CUtlBuffer::GetPtr returns a 64bit pointer that was promoted from a 32bit integral type.
* Use int64/size_t for anything strlen, pointer subtraction, etc..
* Removed invalid structure alignment declarations.
Previously we used Json, however the rest of the game features KeyValues. I changed the system to feature KeyValues instead, to maintain consistency. Also improved the logic behind loading/parsing so we don't reparse the same level settings file if the pointer is still valid and we are on the same level.
'ImGuiConfig::Load()' was loading from the new path, however 'ImGuiConfig::Save()' was not. Defined path as constant expression to avoid this problem in the future. Also loading the files through the engine's API from now on.
'MemAllocSingleton()->Free()' does not call the object's destructor. Ideally we override the default memalloc system with that of the engine, but unlike other Valve Source games, Apex Legends is monolithic and does not export 'MemAllocSingleton()' from tier0. We could manually patch the executable to 'export' this, might need a code cave as this function got inlined practically everywhere.., but even then, this results in a circular import as we import the gamesdk from the exe, which might just work, but Windows 7 is usually a lot less tolerant in approaches like these.
We should explore this in the future.
These methods where only used for and by the VPKDir_t structure.
Also renamed variable and method names to reflect new changes regarding the use of KeyValues by creating a structure with all values defined during file lookup rather than doing this during the pack process.
Only activate the command panel in the host section of the Server Browser when the server is actually simulating. Else we can crash the server by submitting commands when its in an uninitialized state.
Client AI Settings reparse is also only executed when the client is simulating from now on.
The CPackedStore class now heavily relies on the engine's FileSystem and KeyValues API. Since its part of the engine, it would make more sense to utilize the engine's features instead. It also allows for easier modifications.
* The logic behind the build process hasn't changed.
Relies on the engine's implementation of 'KeyValues::RecursiveSaveToFile'. The IFileSystem methods have been fixed up with the CUtlBuffer class rebuild in which we could call these to write a KV memory structure as a file to the disk.
In Apex, the CUtlBuffer members seem to be signed 64bit instead. Changed type accordingly to align SDK structure with that of the engine. Added additional new fields that have been added to Apex.
Uses the same camera range cvar used by the NavMesh renderer: 'navmesh_debug_camera_range'. This allows for rendering them nicely on top of the NavMesh.
* Used 'htonl'/'ntohl' for constructing the length prefix.
* Used static socket/address members instead of pointers.
* Used const qualifier where possible.
* Changed length prefix field type to 'u_long'.
* Removed extraneous include.
* Properly escaped percentage characters on the RCON game client for the ImGui console.
* Added "Rebuild AI Network" (rebuilds the AIN file).
* Added "NavMesh Hot Swap" (hot reloads the navmesh files).
* Added "AI Settings Reparse" (reparses ai settings on the server and client).
This could be done by entering a character in the console (setting m_nInputTextLen > 0), then selecting and replacing valid 'first' character out for a tilde/space. This fixes the issue.
iData->BufTextLen is always 0 in the ImGuiInputTextFlags_CallbackCharFilter event. ImGuiInputTextFlags_CallbackAlways is called before ImGuiInputTextFlags_CallbackCharFilter in the same frame, so we can obtain the lenght from there and perform the test to discard unwanted characters from the input field.