mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* 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.
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
#pragma once
|
|
#include "ai_node.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// CAI_Network
|
|
//
|
|
// Purpose: Stores a node graph through which an AI may pathfind
|
|
//-----------------------------------------------------------------------------
|
|
class CAI_Network
|
|
{
|
|
public:
|
|
char unk0[8]; // +0
|
|
|
|
// this is uninitialised and never set on ain build, fun!
|
|
int linkcount; // +8
|
|
char unk1[124]; // +12
|
|
int zonecount; // +136
|
|
char unk2[16]; // +140
|
|
|
|
// unk8 on disk
|
|
int unk5; // +156
|
|
char unk6[4]; // +160
|
|
int hintcount; // +164
|
|
|
|
// these probably aren't actually hints, but there's 1 of them per hint so idk
|
|
short hints[2000]; // +168
|
|
int scriptnodecount; // +4168
|
|
CAI_ScriptNode scriptnodes[4000]; // +4172
|
|
int nodecount; // +84172
|
|
CAI_Node** nodes; // +84176
|
|
|
|
public:
|
|
static void BuildAINFile(CAI_Network* aiNetwork);
|
|
}; |