mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-02-03 13:11:04 +00:00
- parse all needed fields from things for slope definition.
This commit is contained in:
parent
03a95e090f
commit
bb488236d1
3 changed files with 43 additions and 9 deletions
|
@ -214,8 +214,8 @@ struct MapThing2
|
|||
short angle;
|
||||
short type;
|
||||
short flags;
|
||||
char special;
|
||||
char args[5];
|
||||
uint8_t special;
|
||||
uint8_t args[5];
|
||||
};
|
||||
|
||||
struct IntThing
|
||||
|
@ -228,8 +228,8 @@ struct IntThing
|
|||
short angle;
|
||||
short type;
|
||||
short flags;
|
||||
char special;
|
||||
char args[5];
|
||||
int special;
|
||||
int args[5];
|
||||
|
||||
short pitch; // UDMF
|
||||
float height; // UDMF
|
||||
|
|
|
@ -43,7 +43,20 @@ enum
|
|||
PO_ANCHOR_TYPE = 9300,
|
||||
PO_SPAWN_TYPE,
|
||||
PO_SPAWNCRUSH_TYPE,
|
||||
PO_SPAWNHURT_TYPE
|
||||
PO_SPAWNHURT_TYPE,
|
||||
|
||||
// Thing numbers used to define slopes
|
||||
SMT_VavoomFloor = 1500,
|
||||
SMT_VavoomCeiling = 1501,
|
||||
SMT_VertexFloorZ = 1504,
|
||||
SMT_VertexCeilingZ = 1505,
|
||||
SMT_SlopeFloorPointLine = 9500,
|
||||
SMT_SlopeCeilingPointLine = 9501,
|
||||
SMT_SetFloorSlope = 9502,
|
||||
SMT_SetCeilingSlope = 9503,
|
||||
SMT_CopyFloorPlane = 9510,
|
||||
SMT_CopyCeilingPlane = 9511,
|
||||
|
||||
};
|
||||
|
||||
FLevel::FLevel ()
|
||||
|
|
|
@ -171,9 +171,6 @@ void FProcessor::ParseThing(IntThing *th)
|
|||
const char *value;
|
||||
const char *key = ParseKey(value);
|
||||
|
||||
// The only properties we need from a thing are
|
||||
// x, y, angle and type.
|
||||
|
||||
if (!stricmp(key, "x"))
|
||||
{
|
||||
th->x = CheckFixed(key);
|
||||
|
@ -196,7 +193,31 @@ void FProcessor::ParseThing(IntThing *th)
|
|||
}
|
||||
if (!stricmp(key, "height"))
|
||||
{
|
||||
th->height = CheckFloat(key);
|
||||
th->height = CheckInt(key);
|
||||
}
|
||||
if (!stricmp(key, "special"))
|
||||
{
|
||||
th->special = CheckInt(key);
|
||||
}
|
||||
if (!stricmp(key, "arg0"))
|
||||
{
|
||||
th->args[0] = CheckInt(key);
|
||||
}
|
||||
if (!stricmp(key, "arg1"))
|
||||
{
|
||||
th->args[1] = CheckInt(key);
|
||||
}
|
||||
if (!stricmp(key, "arg2"))
|
||||
{
|
||||
th->args[2] = CheckInt(key);
|
||||
}
|
||||
if (!stricmp(key, "arg3"))
|
||||
{
|
||||
th->args[3] = CheckInt(key);
|
||||
}
|
||||
if (!stricmp(key, "arg4"))
|
||||
{
|
||||
th->args[4] = CheckInt(key);
|
||||
}
|
||||
|
||||
// now store the key in its unprocessed form
|
||||
|
|
Loading…
Reference in a new issue