In the engine, m_query gets memset to size '0x58', and it passes this field as reference to other functions which then access the 3 pointers. Moving the 3 pointers there made the struct size 0x58, and showed a much better disassembly. Moved these type here to reflect the changes made in the engine.
Cluster links were written with an additional padding as the struct is 11 in size, so it gets padded to 12. Cluster links now get correctly written to the disk.
Fixed writing of:
- Path nodes
- Node links
- Path clusters
- Cluster links
The previous globals 'g_pppAiNodeClusters' and 'g_pppAiNodeClusterLinks' were of type CUtlVector. These have been retyped and renamed accordingly.
Also mapped the CAI_Cluster class out slightly more.
Rebuild of path clusters and cluster links are still not correct; parsing a file in from r2, results in a different file on the disk, at the very offset the clusters are being written in (one field is off, this will be investigated soon).
Removed all extraneous copies by adding the class 'InterfaceReg' which will construct a new interface, and link it to the engine's static register. The Source Engine macro 'EXPOSE_INTERFACE_FN' will help utilizing this. The game module from the plugin is not obtained through the process environment block, so the executable is no longer sensitive to names.
Renamed to 'm_bUseLocalSendTableFile'. If set, the 'CClientState::ProcessSendTable()' method drops the SVC_SendTable message, and keeps using the local file instead.
Added 2 comments that speaks for them self's, and 2 additional checks for the second loop as I had triggered several cases where it would loop indefinitely still, as we break out of the parallel loop and continue into the old school loop for the remainder of the outSeqNr - currentIndex frames. This should fix all problems related to this function. After numerous of tests with varying arbitrary outSeqNr values that were vastly larger than the current packet flow index, the bug was no longer triggered. A similar test had also be performed were multiple clients would do this at the same time, and even then; the server frame time(s) remained identical and the whole thing never hung.