2022-02-27 03:15:00 +01:00
|
|
|
//=============================================================================//
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
//
|
|
|
|
//=============================================================================//
|
|
|
|
#pragma once
|
2022-03-21 00:28:14 +01:00
|
|
|
#include "mathlib/vector.h"
|
2022-03-22 17:18:29 +01:00
|
|
|
constexpr int MAX_HULLS = 5;
|
2022-02-27 03:15:00 +01:00
|
|
|
|
2022-03-24 16:31:53 +01:00
|
|
|
#pragma pack(push, 1)
|
2022-02-27 03:15:00 +01:00
|
|
|
//=============================================================================
|
|
|
|
// >> CAI_NodeLink
|
|
|
|
//=============================================================================
|
|
|
|
struct CAI_NodeLink
|
|
|
|
{
|
2022-03-21 00:28:14 +01:00
|
|
|
short m_iSrcID;
|
|
|
|
short m_iDestID;
|
|
|
|
bool m_bHulls[MAX_HULLS];
|
2022-02-27 03:15:00 +01:00
|
|
|
char unk0;
|
|
|
|
char unk1; // maps => unk0 on disk
|
|
|
|
char unk2[5];
|
2022-03-21 00:28:14 +01:00
|
|
|
int64_t m_nFlags;
|
2022-02-27 03:15:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
// >> CAI_NodeLinkDisk
|
|
|
|
//=============================================================================
|
|
|
|
struct CAI_NodeLinkDisk
|
|
|
|
{
|
2022-03-21 00:28:14 +01:00
|
|
|
short m_iSrcID;
|
|
|
|
short m_iDestID;
|
2022-02-27 03:15:00 +01:00
|
|
|
char unk0;
|
2022-03-21 00:28:14 +01:00
|
|
|
bool m_bHulls[MAX_HULLS];
|
2022-02-27 03:15:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
// >> CAI_Node
|
|
|
|
//=============================================================================
|
|
|
|
struct CAI_Node
|
|
|
|
{
|
2022-03-21 00:28:14 +01:00
|
|
|
int m_nIndex; // Not present on disk
|
2022-07-06 21:11:32 +02:00
|
|
|
Vector3D m_vOrigin;
|
2022-03-21 00:28:14 +01:00
|
|
|
float m_fHulls[MAX_HULLS];
|
|
|
|
float m_flYaw;
|
2022-02-27 03:15:00 +01:00
|
|
|
|
|
|
|
int unk0; // Always 2 in buildainfile, maps directly to unk0 in disk struct
|
|
|
|
int unk1; // Maps directly to unk1 in disk struct
|
|
|
|
int unk2[MAX_HULLS]; // Maps directly to unk2 in disk struct, despite being ints rather than shorts
|
|
|
|
|
|
|
|
// View server.dll+393672 for context
|
|
|
|
char unk3[MAX_HULLS]; // Should map to unk3 on disk
|
|
|
|
char pad[3]; // Aligns next bytes
|
|
|
|
float unk4[MAX_HULLS]; // I have no clue, calculated using some kind float function magic
|
|
|
|
|
|
|
|
CAI_NodeLink** links;
|
|
|
|
char unk5[16];
|
2022-03-21 13:48:34 +01:00
|
|
|
int m_nNumLinks;
|
2022-02-27 03:15:00 +01:00
|
|
|
int unk11; // Bad name lmao
|
|
|
|
short unk6; // Should match up to unk4 on disk
|
|
|
|
char unk7[16]; // Padding until next bit
|
|
|
|
short unk8; // Should match up to unk5 on disk
|
|
|
|
char unk9[8]; // Padding until next bit
|
|
|
|
char unk10[8]; // Should match up to unk6 on disk
|
|
|
|
};
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
// >> CAI_NodeDisk
|
|
|
|
//=============================================================================
|
|
|
|
struct CAI_NodeDisk // The way CAI_Nodes are represented in on-disk ain files
|
|
|
|
{
|
2022-07-06 21:11:32 +02:00
|
|
|
Vector3D m_vOrigin;
|
2022-03-21 00:28:14 +01:00
|
|
|
|
|
|
|
float m_flYaw;
|
2022-02-27 03:15:00 +01:00
|
|
|
float hulls[MAX_HULLS];
|
|
|
|
|
|
|
|
char unk0;
|
|
|
|
int unk1;
|
|
|
|
short unk2[MAX_HULLS];
|
|
|
|
char unk3[MAX_HULLS];
|
|
|
|
short unk4;
|
|
|
|
short unk5;
|
|
|
|
char unk6[8];
|
|
|
|
}; // Total size of 68 bytes
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
// >> CAI_ScriptNode
|
|
|
|
//=============================================================================
|
|
|
|
struct CAI_ScriptNode
|
|
|
|
{
|
2022-07-06 21:11:32 +02:00
|
|
|
Vector3D m_vOrigin;
|
2022-02-27 03:15:00 +01:00
|
|
|
uint64_t scriptdata;
|
|
|
|
};
|
|
|
|
|
2022-03-20 17:03:46 +01:00
|
|
|
struct AINodeClusters
|
2022-02-27 03:15:00 +01:00
|
|
|
{
|
2022-03-21 00:28:14 +01:00
|
|
|
int m_nIndex;
|
2022-02-27 03:15:00 +01:00
|
|
|
char unk0;
|
|
|
|
char unk1; // Maps to unk1 on disk
|
|
|
|
char pad0[2]; // Padding to +8
|
|
|
|
|
2022-07-06 21:11:32 +02:00
|
|
|
Vector3D m_vOrigin;
|
2022-02-27 03:15:00 +01:00
|
|
|
|
|
|
|
char pad5[4];
|
|
|
|
int* unk2; // Maps to unk5 on disk;
|
|
|
|
char pad1[16]; // Pad to +48
|
|
|
|
int unkcount0; // Maps to unkcount0 on disk
|
|
|
|
|
|
|
|
char pad2[4]; // Pad to +56
|
|
|
|
int* unk3;
|
|
|
|
char pad3[16]; // Pad to +80
|
|
|
|
int unkcount1;
|
|
|
|
|
|
|
|
char pad4[132];
|
|
|
|
char unk5;
|
|
|
|
};
|
|
|
|
|
2022-03-20 17:03:46 +01:00
|
|
|
struct AINodeClusterLinks
|
2022-02-27 03:15:00 +01:00
|
|
|
{
|
|
|
|
short unk0;
|
|
|
|
short unk1;
|
|
|
|
int unk2;
|
|
|
|
char unk3;
|
|
|
|
char unk4;
|
|
|
|
char unk5;
|
|
|
|
};
|
2022-03-24 16:31:53 +01:00
|
|
|
#pragma pack(pop)
|