map ents fixes

This commit is contained in:
momo5502 2016-05-16 20:50:24 +02:00
parent 3a2d64e936
commit 27e9487345
2 changed files with 53 additions and 3 deletions

View File

@ -68,7 +68,8 @@ namespace Components
if (ents.Exists())
{
mapEntities = ents.GetBuffer();
asset.mapEnts->entitystring = mapEntities.data();
asset.mapEnts->entityString = const_cast<char*>(mapEntities.data());
asset.mapEnts->numEntityChars = mapEntities.size();
}
}
}

View File

@ -1092,10 +1092,59 @@ namespace Game
const char* name;
};
struct Bounds
{
vec3_t midPoint;
vec3_t halfSize;
};
struct TriggerModel
{
int contents;
unsigned short hullCount;
unsigned short firstHull;
};
struct TriggerHull
{
Bounds bounds;
int contents;
unsigned short slabCount;
unsigned short firstSlab;
};
struct TriggerSlab
{
vec3_t dir;
float midPoint;
float halfSize;
};
struct MapTriggers
{
int modelCount;
TriggerModel* models; // sizeof 8
int hullCount;
TriggerHull* hulls; // sizeof 32
int slabCount;
TriggerSlab* slabs; // sizeof 20
};
struct Stage
{
char * stageName;
float offset[3];
int flags;
};
struct MapEnts
{
const char* name;
const char* entitystring;
const char *name;
char *entityString;
int numEntityChars;
MapTriggers trigger;
Stage * stages;
char stageCount;
};
struct StringTableCell