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-09-28 00:14:33 +02:00
|
|
|
constexpr int NOT_CACHED = -2; // Returned if data not in cache
|
|
|
|
constexpr int NO_NODE = -1; // Returned when no node meets the qualification
|
|
|
|
|
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];
|
2023-08-27 11:36:58 +02:00
|
|
|
byte m_LinkInfo;
|
2022-02-27 03:15:00 +01:00
|
|
|
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_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;
|
2023-08-27 11:36:58 +02:00
|
|
|
void* unkBuf0;
|
|
|
|
void* unkBuf1;
|
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_ScriptNode
|
|
|
|
//=============================================================================
|
|
|
|
struct CAI_ScriptNode
|
|
|
|
{
|
2022-07-06 21:11:32 +02:00
|
|
|
Vector3D m_vOrigin;
|
2023-08-27 00:56:38 +02:00
|
|
|
|
|
|
|
// Might be wrong; seems to be used for clamping.
|
|
|
|
// See [r5apex_ds + 0xF28A6E]
|
|
|
|
int m_nMin;
|
|
|
|
int m_nMax;
|
2022-02-27 03:15:00 +01:00
|
|
|
};
|
|
|
|
|
2023-08-24 23:44:57 +02:00
|
|
|
//=============================================================================
|
|
|
|
// >> CAI_Cluster
|
|
|
|
//=============================================================================
|
|
|
|
struct CAI_Cluster
|
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;
|
2023-08-24 23:44:57 +02:00
|
|
|
char unk1; // Maps to unk1 on disk
|
2022-02-27 03:15:00 +01:00
|
|
|
|
2022-07-06 21:11:32 +02:00
|
|
|
Vector3D m_vOrigin;
|
2023-08-24 23:44:57 +02:00
|
|
|
char unkC; // idk, might be a 4 bytes type or just padding.
|
|
|
|
|
|
|
|
// These are utlvectors in engine, but its
|
|
|
|
// unknown what they do yet.
|
|
|
|
CUtlVector<int> unkVec0;
|
|
|
|
CUtlVector<int> unkVec1;
|
|
|
|
|
|
|
|
// This is an array of floats that is indexed
|
2023-08-27 00:56:38 +02:00
|
|
|
// into by teamNum at [r5apex_ds + EC84DC];
|
2023-08-24 23:44:57 +02:00
|
|
|
// Seems to be used along with the cvar:
|
|
|
|
// 'ai_path_dangerous_cluster_min_time'.
|
|
|
|
float clusterTime[MAX_TEAMS];
|
|
|
|
|
|
|
|
float field_0250;
|
|
|
|
float field_0254;
|
|
|
|
float field_0258;
|
2022-02-27 03:15:00 +01:00
|
|
|
char unk5;
|
|
|
|
};
|
2023-08-24 23:44:57 +02:00
|
|
|
static_assert(sizeof(CAI_Cluster) == 608);
|
2022-02-27 03:15:00 +01:00
|
|
|
|
2023-08-24 23:44:57 +02:00
|
|
|
//=============================================================================
|
|
|
|
// >> CAI_ClusterLink
|
|
|
|
//=============================================================================
|
|
|
|
struct CAI_ClusterLink
|
2022-02-27 03:15:00 +01:00
|
|
|
{
|
2023-08-24 23:44:57 +02:00
|
|
|
short prevIndex_MAYBE;
|
|
|
|
short nextIndex_MAYBE;
|
2022-02-27 03:15:00 +01:00
|
|
|
int unk2;
|
2023-08-24 23:44:57 +02:00
|
|
|
char flags;
|
2022-02-27 03:15:00 +01:00
|
|
|
char unk4;
|
|
|
|
char unk5;
|
|
|
|
};
|
2023-08-24 23:44:57 +02:00
|
|
|
static_assert(sizeof(CAI_ClusterLink) == 12);
|