Add collision types to SDK

Merged from branch 'collision_debug'.
This commit is contained in:
Kawe Mazidjatari 2023-03-27 17:42:55 +02:00
parent 296a0df948
commit c86122f63e
2 changed files with 57 additions and 1 deletions

View File

@ -76,4 +76,42 @@ struct cplanetrace_t
float dist;
};
#endif // CMODEL_H
struct dsurfaceproperty_t
{
__int16 unk;
byte unk2;
byte contentMaskOffset;
int surfaceNameOffset;
};
struct dbvhnode_t
{
__int16 mins_x[4];
__int16 mins_y[4];
__int16 mins_z[4];
__int16 maxs_x[4];
__int16 maxs_y[4];
__int16 maxs_z[4];
int index_child01_types;
int index_child23_types;
int index_cm;
int index_pad;
};
struct bspmodel_t
{
dbvhnode_t* bvhnodes;
dsurfaceproperty_t* surfaceproperties;
int* bvhleafdata;
void* vertices;
int* contentmasks;
char* texdatastringdata;
int unk;
int unk2;
float unk_f1;
float unk_f2;
float unk_f3;
float unk_f4;
};
#endif // CMODEL_H

View File

@ -41,4 +41,22 @@ public:
static_assert(sizeof(CGameTrace) == 0x180);
typedef CGameTrace trace_t;
//-----------------------------------------------------------------------------
// Purpose: A collision query
//-----------------------------------------------------------------------------
struct CollisionQuery_t
{
bspmodel_t* pModel;
char* pVertices;
char unk_10[16];
int trace_contents;
char unk[556];
void** func_table;
void* funcs_250[6];
char unk_288[80];
trace_t* trace;
char unk_2D8[54];
};
static_assert(sizeof(CollisionQuery_t) == 0x318);
#endif // GAMETRACE_H