mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 08:30:49 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
39b5bcc4f0
10 changed files with 158 additions and 116 deletions
|
@ -337,6 +337,7 @@ struct mapthinghexen_t
|
||||||
};
|
};
|
||||||
|
|
||||||
class FArchive;
|
class FArchive;
|
||||||
|
struct FDoomEdEntry;
|
||||||
|
|
||||||
// Internal representation of a mapthing
|
// Internal representation of a mapthing
|
||||||
struct FMapThing
|
struct FMapThing
|
||||||
|
@ -346,7 +347,8 @@ struct FMapThing
|
||||||
fixed_t y;
|
fixed_t y;
|
||||||
fixed_t z;
|
fixed_t z;
|
||||||
short angle;
|
short angle;
|
||||||
short type;
|
FDoomEdEntry *info;
|
||||||
|
short EdNum;
|
||||||
WORD SkillFilter;
|
WORD SkillFilter;
|
||||||
WORD ClassFilter;
|
WORD ClassFilter;
|
||||||
DWORD flags;
|
DWORD flags;
|
||||||
|
@ -364,7 +366,7 @@ struct FMapThing
|
||||||
short roll;
|
short roll;
|
||||||
DWORD RenderStyle;
|
DWORD RenderStyle;
|
||||||
|
|
||||||
void Serialize (FArchive &);
|
//void Serialize (FArchive &);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,20 +45,31 @@
|
||||||
|
|
||||||
|
|
||||||
const char *SpecialMapthingNames[] = {
|
const char *SpecialMapthingNames[] = {
|
||||||
"$PLAYER1START",
|
"$Player1Start",
|
||||||
"$PLAYER2START",
|
"$Player2Start",
|
||||||
"$PLAYER3START",
|
"$Player3Start",
|
||||||
"$PLAYER4START",
|
"$Player4Start",
|
||||||
"$PLAYER5START",
|
"$Player5Start",
|
||||||
"$PLAYER6START",
|
"$Player6Start",
|
||||||
"$PLAYER7START",
|
"$Player7Start",
|
||||||
"$PLAYER8START",
|
"$Player8Start",
|
||||||
"$DEATHMATCHSTART",
|
"$DeathmatchStart",
|
||||||
"$SSEQOVERRIDE",
|
"$SSeqOverride",
|
||||||
"$POLYANCHOR",
|
"$PolyAnchor",
|
||||||
"$POLYSPAWN",
|
"$PolySpawn",
|
||||||
"$POLYSPAWNCRUSH",
|
"$PolySpawnCrush",
|
||||||
"$POLYSPAWNHURT"
|
"$PolySpawnHurt",
|
||||||
|
"$SlopeFloorPointLine",
|
||||||
|
"$SlopeCeilingPointLine",
|
||||||
|
"$SetFloorSlope",
|
||||||
|
"$SetCeilingSlope",
|
||||||
|
"$VavoomFloor",
|
||||||
|
"$VavoomCeiling",
|
||||||
|
"$CopyFloorPlane",
|
||||||
|
"$CopyCeilingPlane",
|
||||||
|
"$VertexFloorZ",
|
||||||
|
"$VertexCeilingZ",
|
||||||
|
|
||||||
};
|
};
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
|
39
src/info.h
39
src/info.h
|
@ -287,20 +287,31 @@ struct FDoomEdEntry
|
||||||
|
|
||||||
enum ESpecialMapthings
|
enum ESpecialMapthings
|
||||||
{
|
{
|
||||||
SMT_PLAYER1START = 1,
|
SMT_Player1Start = 1,
|
||||||
SMT_PLAYER2START,
|
SMT_Player2Start,
|
||||||
SMT_PLAYER3START,
|
SMT_Player3Start,
|
||||||
SMT_PLAYER4START,
|
SMT_Player4Start,
|
||||||
SMT_PLAYER5START,
|
SMT_Player5Start,
|
||||||
SMT_PLAYER6START,
|
SMT_Player6Start,
|
||||||
SMT_PLAYER7START,
|
SMT_Player7Start,
|
||||||
SMT_PLAYER8START,
|
SMT_Player8Start,
|
||||||
SMT_DEATHMATCHSTART,
|
SMT_DeathmatchStart,
|
||||||
SMT_SSEQOVERRIDE,
|
SMT_SSeqOverride,
|
||||||
SMT_POLYANCHOR,
|
SMT_PolyAnchor,
|
||||||
SMT_POLYSPAWN,
|
SMT_PolySpawn,
|
||||||
SMT_POLYSPAWNCRUSH,
|
SMT_PolySpawnCrush,
|
||||||
SMT_POLYSPAWNHURT,
|
SMT_PolySpawnHurt,
|
||||||
|
SMT_SlopeFloorPointLine,
|
||||||
|
SMT_SlopeCeilingPointLine,
|
||||||
|
SMT_SetFloorSlope,
|
||||||
|
SMT_SetCeilingSlope,
|
||||||
|
SMT_VavoomFloor,
|
||||||
|
SMT_VavoomCeiling,
|
||||||
|
SMT_CopyFloorPlane,
|
||||||
|
SMT_CopyCeilingPlane,
|
||||||
|
SMT_VertexFloorZ,
|
||||||
|
SMT_VertexCeilingZ,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -716,30 +716,31 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
|
||||||
mapthings[count].args[1] = xsprites[i].Data4;
|
mapthings[count].args[1] = xsprites[i].Data4;
|
||||||
mapthings[count].args[2] = xsprites[i].Data1;
|
mapthings[count].args[2] = xsprites[i].Data1;
|
||||||
mapthings[count].args[3] = xsprites[i].Data2;
|
mapthings[count].args[3] = xsprites[i].Data2;
|
||||||
mapthings[count].type = 14065;
|
mapthings[count].EdNum = 14065;
|
||||||
}
|
}
|
||||||
else if (xsprites != NULL && sprites[i].lotag == 1)
|
else if (xsprites != NULL && sprites[i].lotag == 1)
|
||||||
{ // Blood player start
|
{ // Blood player start
|
||||||
if (xsprites[i].Data1 < 4)
|
if (xsprites[i].Data1 < 4)
|
||||||
mapthings[count].type = 1 + xsprites[i].Data1;
|
mapthings[count].EdNum= 1 + xsprites[i].Data1;
|
||||||
else
|
else
|
||||||
mapthings[count].type = 4001 + xsprites[i].Data1 - 4;
|
mapthings[count].EdNum = 4001 + xsprites[i].Data1 - 4;
|
||||||
}
|
}
|
||||||
else if (xsprites != NULL && sprites[i].lotag == 2)
|
else if (xsprites != NULL && sprites[i].lotag == 2)
|
||||||
{ // Bloodbath start
|
{ // Bloodbath start
|
||||||
mapthings[count].type = 11;
|
mapthings[count].EdNum = 11;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (sprites[i].cstat & 32768) continue;
|
if (sprites[i].cstat & 32768) continue;
|
||||||
if (sprites[i].xrepeat == 0 || sprites[i].yrepeat == 0) continue;
|
if (sprites[i].xrepeat == 0 || sprites[i].yrepeat == 0) continue;
|
||||||
|
|
||||||
mapthings[count].type = 9988;
|
mapthings[count].EdNum = 9988;
|
||||||
mapthings[count].args[0] = sprites[i].picnum;
|
mapthings[count].args[0] = sprites[i].picnum;
|
||||||
mapthings[count].args[2] = sprites[i].xrepeat;
|
mapthings[count].args[2] = sprites[i].xrepeat;
|
||||||
mapthings[count].args[3] = sprites[i].yrepeat;
|
mapthings[count].args[3] = sprites[i].yrepeat;
|
||||||
mapthings[count].args[4] = sprites[i].cstat;
|
mapthings[count].args[4] = sprites[i].cstat;
|
||||||
}
|
}
|
||||||
|
mapthings[count].info = DoomEdMap.CheckKey(mapthings[count].EdNum);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
|
@ -783,7 +784,7 @@ static void CreateStartSpot (fixed_t *pos, FMapThing *start)
|
||||||
FMapThing mt =
|
FMapThing mt =
|
||||||
{
|
{
|
||||||
0, (LittleLong(pos[0])<<12), ((-LittleLong(pos[1]))<<12), 0,// tid, x, y, z
|
0, (LittleLong(pos[0])<<12), ((-LittleLong(pos[1]))<<12), 0,// tid, x, y, z
|
||||||
short(Scale ((2048-angle)&2047, 360, 2048)), 1, // angle, type
|
short(Scale ((2048-angle)&2047, 360, 2048)), DoomEdMap.CheckKey(1), 1, // angle, type
|
||||||
0, 0, // Skillfilter, Classfilter
|
0, 0, // Skillfilter, Classfilter
|
||||||
7|MTF_SINGLE|224, // flags
|
7|MTF_SINGLE|224, // flags
|
||||||
0, {0}, 0 // special is 0, args and Conversation are 0
|
0, {0}, 0 // special is 0, args and Conversation are 0
|
||||||
|
|
|
@ -384,11 +384,6 @@ void AActor::Serialize (FArchive &arc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FMapThing::Serialize (FArchive &arc)
|
|
||||||
{
|
|
||||||
arc << thingid << x << y << z << angle << type << flags << special
|
|
||||||
<< args[0] << args[1] << args[2] << args[3] << args[4];
|
|
||||||
}
|
|
||||||
|
|
||||||
AActor::AActor () throw()
|
AActor::AActor () throw()
|
||||||
{
|
{
|
||||||
|
@ -4597,17 +4592,17 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
AActor *mobj;
|
AActor *mobj;
|
||||||
fixed_t x, y, z;
|
fixed_t x, y, z;
|
||||||
|
|
||||||
if (mthing->type == 0 || mthing->type == -1)
|
if (mthing->EdNum == 0 || mthing->EdNum == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// find which type to spawn
|
// find which type to spawn
|
||||||
FDoomEdEntry *mentry = DoomEdMap.CheckKey(mthing->type);
|
FDoomEdEntry *mentry = mthing->info;
|
||||||
|
|
||||||
if (mentry == NULL)
|
if (mentry == NULL)
|
||||||
{
|
{
|
||||||
// [RH] Don't die if the map tries to spawn an unknown thing
|
// [RH] Don't die if the map tries to spawn an unknown thing
|
||||||
Printf ("Unknown type %i at (%i, %i)\n",
|
Printf ("Unknown type %i at (%i, %i)\n",
|
||||||
mthing->type,
|
mthing->EdNum,
|
||||||
mthing->x>>FRACBITS, mthing->y>>FRACBITS);
|
mthing->x>>FRACBITS, mthing->y>>FRACBITS);
|
||||||
mentry = DoomEdMap.CheckKey(0);
|
mentry = DoomEdMap.CheckKey(0);
|
||||||
if (mentry == NULL) // we need a valid entry for the rest of this function so if we can't find a default, let's exit right away.
|
if (mentry == NULL) // we need a valid entry for the rest of this function so if we can't find a default, let's exit right away.
|
||||||
|
@ -4634,7 +4629,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
|
|
||||||
switch (mentry->Special)
|
switch (mentry->Special)
|
||||||
{
|
{
|
||||||
case SMT_DEATHMATCHSTART:
|
case SMT_DeathmatchStart:
|
||||||
{
|
{
|
||||||
// count deathmatch start positions
|
// count deathmatch start positions
|
||||||
FPlayerStart start(mthing, 0);
|
FPlayerStart start(mthing, 0);
|
||||||
|
@ -4642,10 +4637,10 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SMT_POLYANCHOR:
|
case SMT_PolyAnchor:
|
||||||
case SMT_POLYSPAWN:
|
case SMT_PolySpawn:
|
||||||
case SMT_POLYSPAWNCRUSH:
|
case SMT_PolySpawnCrush:
|
||||||
case SMT_POLYSPAWNHURT:
|
case SMT_PolySpawnHurt:
|
||||||
{
|
{
|
||||||
polyspawns_t *polyspawn = new polyspawns_t;
|
polyspawns_t *polyspawn = new polyspawns_t;
|
||||||
polyspawn->next = polyspawns;
|
polyspawn->next = polyspawns;
|
||||||
|
@ -4654,20 +4649,20 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
polyspawn->angle = mthing->angle;
|
polyspawn->angle = mthing->angle;
|
||||||
polyspawn->type = mentry->Special;
|
polyspawn->type = mentry->Special;
|
||||||
polyspawns = polyspawn;
|
polyspawns = polyspawn;
|
||||||
if (mentry->Special != SMT_POLYANCHOR)
|
if (mentry->Special != SMT_PolyAnchor)
|
||||||
po_NumPolyobjs++;
|
po_NumPolyobjs++;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SMT_PLAYER1START:
|
case SMT_Player1Start:
|
||||||
case SMT_PLAYER2START:
|
case SMT_Player2Start:
|
||||||
case SMT_PLAYER3START:
|
case SMT_Player3Start:
|
||||||
case SMT_PLAYER4START:
|
case SMT_Player4Start:
|
||||||
case SMT_PLAYER5START:
|
case SMT_Player5Start:
|
||||||
case SMT_PLAYER6START:
|
case SMT_Player6Start:
|
||||||
case SMT_PLAYER7START:
|
case SMT_Player7Start:
|
||||||
case SMT_PLAYER8START:
|
case SMT_Player8Start:
|
||||||
pnum = mentry->Special - SMT_PLAYER1START;
|
pnum = mentry->Special - SMT_Player1Start;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Sound sequence override will be handled later
|
// Sound sequence override will be handled later
|
||||||
|
@ -4752,7 +4747,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
}
|
}
|
||||||
|
|
||||||
// [RH] sound sequence overriders
|
// [RH] sound sequence overriders
|
||||||
if (mentry->Type == NULL && mentry->Special == SMT_SSEQOVERRIDE)
|
if (mentry->Type == NULL && mentry->Special == SMT_SSeqOverride)
|
||||||
{
|
{
|
||||||
int type = mentry->Args[0];
|
int type = mentry->Args[0];
|
||||||
if (type == 255) type = -1;
|
if (type == 255) type = -1;
|
||||||
|
|
|
@ -1665,7 +1665,7 @@ AActor *SpawnMapThing(int index, FMapThing *mt, int position)
|
||||||
if (dumpspawnedthings)
|
if (dumpspawnedthings)
|
||||||
{
|
{
|
||||||
Printf("%5d: (%5d, %5d, %5d), doomednum = %5d, flags = %04x, type = %s\n",
|
Printf("%5d: (%5d, %5d, %5d), doomednum = %5d, flags = %04x, type = %s\n",
|
||||||
index, mt->x>>FRACBITS, mt->y>>FRACBITS, mt->z>>FRACBITS, mt->type, mt->flags,
|
index, mt->x>>FRACBITS, mt->y>>FRACBITS, mt->z>>FRACBITS, mt->EdNum, mt->flags,
|
||||||
spawned? spawned->GetClass()->TypeName.GetChars() : "(none)");
|
spawned? spawned->GetClass()->TypeName.GetChars() : "(none)");
|
||||||
}
|
}
|
||||||
T_AddSpawnedThing(spawned);
|
T_AddSpawnedThing(spawned);
|
||||||
|
@ -1785,7 +1785,8 @@ void P_LoadThings (MapData * map)
|
||||||
mti[i].x = LittleShort(mt->x) << FRACBITS;
|
mti[i].x = LittleShort(mt->x) << FRACBITS;
|
||||||
mti[i].y = LittleShort(mt->y) << FRACBITS;
|
mti[i].y = LittleShort(mt->y) << FRACBITS;
|
||||||
mti[i].angle = LittleShort(mt->angle);
|
mti[i].angle = LittleShort(mt->angle);
|
||||||
mti[i].type = LittleShort(mt->type);
|
mti[i].EdNum = LittleShort(mt->type);
|
||||||
|
mti[i].info = DoomEdMap.CheckKey(mti[i].EdNum);
|
||||||
}
|
}
|
||||||
delete [] mtp;
|
delete [] mtp;
|
||||||
}
|
}
|
||||||
|
@ -1825,7 +1826,8 @@ void P_LoadThings2 (MapData * map)
|
||||||
mti[i].y = LittleShort(mth[i].y)<<FRACBITS;
|
mti[i].y = LittleShort(mth[i].y)<<FRACBITS;
|
||||||
mti[i].z = LittleShort(mth[i].z)<<FRACBITS;
|
mti[i].z = LittleShort(mth[i].z)<<FRACBITS;
|
||||||
mti[i].angle = LittleShort(mth[i].angle);
|
mti[i].angle = LittleShort(mth[i].angle);
|
||||||
mti[i].type = LittleShort(mth[i].type);
|
mti[i].EdNum = LittleShort(mth[i].type);
|
||||||
|
mti[i].info = DoomEdMap.CheckKey(mti[i].EdNum);
|
||||||
mti[i].flags = LittleShort(mth[i].flags);
|
mti[i].flags = LittleShort(mth[i].flags);
|
||||||
mti[i].special = mth[i].special;
|
mti[i].special = mth[i].special;
|
||||||
for(int j=0;j<5;j++) mti[i].args[j] = mth[i].args[j];
|
for(int j=0;j<5;j++) mti[i].args[j] = mth[i].args[j];
|
||||||
|
@ -3336,14 +3338,14 @@ void P_GetPolySpots (MapData * map, TArray<FNodeBuilder::FPolyStart> &spots, TAr
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < MapThingsConverted.Size(); ++i)
|
for (unsigned int i = 0; i < MapThingsConverted.Size(); ++i)
|
||||||
{
|
{
|
||||||
FDoomEdEntry *mentry = DoomEdMap.CheckKey(MapThingsConverted[i].type);
|
FDoomEdEntry *mentry = MapThingsConverted[i].info;
|
||||||
if (mentry != NULL && mentry->Type == NULL && mentry->Special >= SMT_POLYANCHOR && mentry->Special <= SMT_POLYSPAWNHURT)
|
if (mentry != NULL && mentry->Type == NULL && mentry->Special >= SMT_PolyAnchor && mentry->Special <= SMT_PolySpawnHurt)
|
||||||
{
|
{
|
||||||
FNodeBuilder::FPolyStart newvert;
|
FNodeBuilder::FPolyStart newvert;
|
||||||
newvert.x = MapThingsConverted[i].x;
|
newvert.x = MapThingsConverted[i].x;
|
||||||
newvert.y = MapThingsConverted[i].y;
|
newvert.y = MapThingsConverted[i].y;
|
||||||
newvert.polynum = MapThingsConverted[i].angle;
|
newvert.polynum = MapThingsConverted[i].angle;
|
||||||
if (mentry->Special == SMT_POLYANCHOR)
|
if (mentry->Special == SMT_PolyAnchor)
|
||||||
{
|
{
|
||||||
anchors.Push (newvert);
|
anchors.Push (newvert);
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,20 +266,6 @@ void P_VavoomSlope(sector_t * sec, int id, fixed_t x, fixed_t y, fixed_t z, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
THING_SlopeFloorPointLine = 9500,
|
|
||||||
THING_SlopeCeilingPointLine = 9501,
|
|
||||||
THING_SetFloorSlope = 9502,
|
|
||||||
THING_SetCeilingSlope = 9503,
|
|
||||||
THING_CopyFloorPlane = 9510,
|
|
||||||
THING_CopyCeilingPlane = 9511,
|
|
||||||
THING_VavoomFloor=1500,
|
|
||||||
THING_VavoomCeiling=1501,
|
|
||||||
THING_VertexFloorZ=1504,
|
|
||||||
THING_VertexCeilingZ=1505,
|
|
||||||
};
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// P_SetSlopesFromVertexHeights
|
// P_SetSlopesFromVertexHeights
|
||||||
|
@ -294,13 +280,15 @@ static void P_SetSlopesFromVertexHeights(FMapThing *firstmt, FMapThing *lastmt,
|
||||||
|
|
||||||
for (mt = firstmt; mt < lastmt; ++mt)
|
for (mt = firstmt; mt < lastmt; ++mt)
|
||||||
{
|
{
|
||||||
if (mt->type == THING_VertexFloorZ || mt->type == THING_VertexCeilingZ)
|
if (mt->info != NULL && mt->info->Type == NULL)
|
||||||
|
{
|
||||||
|
if (mt->info->Special == SMT_VertexFloorZ || mt->info->Special == SMT_VertexCeilingZ)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < numvertexes; i++)
|
for (int i = 0; i < numvertexes; i++)
|
||||||
{
|
{
|
||||||
if (vertexes[i].x == mt->x && vertexes[i].y == mt->y)
|
if (vertexes[i].x == mt->x && vertexes[i].y == mt->y)
|
||||||
{
|
{
|
||||||
if (mt->type == THING_VertexFloorZ)
|
if (mt->info->Special == SMT_VertexFloorZ)
|
||||||
{
|
{
|
||||||
vt_heights[0][i] = mt->z;
|
vt_heights[0][i] = mt->z;
|
||||||
}
|
}
|
||||||
|
@ -311,7 +299,8 @@ static void P_SetSlopesFromVertexHeights(FMapThing *firstmt, FMapThing *lastmt,
|
||||||
vt_found = true;
|
vt_found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mt->type = 0;
|
mt->EdNum = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -427,49 +416,51 @@ void P_SpawnSlopeMakers (FMapThing *firstmt, FMapThing *lastmt, const int *oldve
|
||||||
|
|
||||||
for (mt = firstmt; mt < lastmt; ++mt)
|
for (mt = firstmt; mt < lastmt; ++mt)
|
||||||
{
|
{
|
||||||
if ((mt->type >= THING_SlopeFloorPointLine &&
|
if (mt->info != NULL && mt->info->Type == NULL &&
|
||||||
mt->type <= THING_SetCeilingSlope) ||
|
(mt->info->Special >= SMT_SlopeFloorPointLine && mt->info->Special <= SMT_VavoomCeiling))
|
||||||
mt->type == THING_VavoomFloor || mt->type == THING_VavoomCeiling)
|
|
||||||
{
|
{
|
||||||
fixed_t x, y, z;
|
fixed_t x, y, z;
|
||||||
secplane_t *refplane;
|
secplane_t *refplane;
|
||||||
sector_t *sec;
|
sector_t *sec;
|
||||||
|
bool ceiling;
|
||||||
|
|
||||||
x = mt->x;
|
x = mt->x;
|
||||||
y = mt->y;
|
y = mt->y;
|
||||||
sec = P_PointInSector (x, y);
|
sec = P_PointInSector (x, y);
|
||||||
if (mt->type & 1)
|
if (mt->info->Special == SMT_SlopeCeilingPointLine || mt->info->Special == SMT_VavoomCeiling || mt->info->Special == SMT_SetCeilingSlope)
|
||||||
{
|
{
|
||||||
refplane = &sec->ceilingplane;
|
refplane = &sec->ceilingplane;
|
||||||
|
ceiling = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
refplane = &sec->floorplane;
|
refplane = &sec->floorplane;
|
||||||
|
ceiling = false;
|
||||||
}
|
}
|
||||||
z = refplane->ZatPoint (x, y) + (mt->z);
|
z = refplane->ZatPoint (x, y) + (mt->z);
|
||||||
if (mt->type == THING_VavoomFloor || mt->type == THING_VavoomCeiling)
|
if (mt->info->Special <= SMT_SlopeCeilingPointLine)
|
||||||
{
|
{ // SlopeFloorPointLine and SlopCeilingPointLine
|
||||||
P_VavoomSlope(sec, mt->thingid, x, y, mt->z, mt->type & 1);
|
P_SlopeLineToPoint (mt->args[0], x, y, z, ceiling);
|
||||||
}
|
}
|
||||||
else if (mt->type <= THING_SlopeCeilingPointLine)
|
else if (mt->info->Special <= SMT_SetCeilingSlope)
|
||||||
{ // THING_SlopeFloorPointLine and THING_SlopCeilingPointLine
|
{ // SetFloorSlope and SetCeilingSlope
|
||||||
P_SlopeLineToPoint (mt->args[0], x, y, z, mt->type & 1);
|
P_SetSlope (refplane, ceiling, mt->angle, mt->args[0], x, y, z);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // THING_SetFloorSlope and THING_SetCeilingSlope
|
{ // VavoomFloor and VavoomCeiling
|
||||||
P_SetSlope (refplane, mt->type & 1, mt->angle, mt->args[0], x, y, z);
|
P_VavoomSlope(sec, mt->thingid, x, y, mt->z, ceiling);
|
||||||
}
|
}
|
||||||
mt->type = 0;
|
mt->EdNum = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (mt = firstmt; mt < lastmt; ++mt)
|
for (mt = firstmt; mt < lastmt; ++mt)
|
||||||
{
|
{
|
||||||
if (mt->type == THING_CopyFloorPlane ||
|
if (mt->info != NULL && mt->info->Type == NULL &&
|
||||||
mt->type == THING_CopyCeilingPlane)
|
(mt->info->Special == SMT_CopyFloorPlane || mt->info->Special == SMT_CopyCeilingPlane))
|
||||||
{
|
{
|
||||||
P_CopyPlane (mt->args[0], mt->x, mt->y, mt->type & 1);
|
P_CopyPlane (mt->args[0], mt->x, mt->y, mt->info->Special == SMT_CopyCeilingPlane);
|
||||||
mt->type = 0;
|
mt->EdNum = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -500,7 +500,8 @@ public:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAME_Type:
|
case NAME_Type:
|
||||||
th->type = (short)CheckInt(key);
|
th->EdNum = (short)CheckInt(key);
|
||||||
|
th->info = DoomEdMap.CheckKey(th->EdNum);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAME_Conversation:
|
case NAME_Conversation:
|
||||||
|
|
|
@ -1561,8 +1561,8 @@ static void SpawnPolyobj (int index, int tag, int type)
|
||||||
sd->linedef->args[0] = 0;
|
sd->linedef->args[0] = 0;
|
||||||
IterFindPolySides(&polyobjs[index], sd);
|
IterFindPolySides(&polyobjs[index], sd);
|
||||||
po->MirrorNum = sd->linedef->args[1];
|
po->MirrorNum = sd->linedef->args[1];
|
||||||
po->crush = (type != SMT_POLYSPAWN) ? 3 : 0;
|
po->crush = (type != SMT_PolySpawn) ? 3 : 0;
|
||||||
po->bHurtOnTouch = (type == SMT_POLYSPAWNHURT);
|
po->bHurtOnTouch = (type == SMT_PolySpawnHurt);
|
||||||
po->tag = tag;
|
po->tag = tag;
|
||||||
po->seqType = sd->linedef->args[2];
|
po->seqType = sd->linedef->args[2];
|
||||||
if (po->seqType < 0 || po->seqType > 63)
|
if (po->seqType < 0 || po->seqType > 63)
|
||||||
|
@ -1632,8 +1632,8 @@ static void SpawnPolyobj (int index, int tag, int type)
|
||||||
}
|
}
|
||||||
if (po->Sidedefs.Size() > 0)
|
if (po->Sidedefs.Size() > 0)
|
||||||
{
|
{
|
||||||
po->crush = (type != SMT_POLYSPAWN) ? 3 : 0;
|
po->crush = (type != SMT_PolySpawn) ? 3 : 0;
|
||||||
po->bHurtOnTouch = (type == SMT_POLYSPAWNHURT);
|
po->bHurtOnTouch = (type == SMT_PolySpawnHurt);
|
||||||
po->tag = tag;
|
po->tag = tag;
|
||||||
po->seqType = po->Sidedefs[0]->linedef->args[3];
|
po->seqType = po->Sidedefs[0]->linedef->args[3];
|
||||||
po->MirrorNum = po->Sidedefs[0]->linedef->args[2];
|
po->MirrorNum = po->Sidedefs[0]->linedef->args[2];
|
||||||
|
@ -1756,7 +1756,7 @@ void PO_Init (void)
|
||||||
for (polyspawn = polyspawns, prev = &polyspawns; polyspawn;)
|
for (polyspawn = polyspawns, prev = &polyspawns; polyspawn;)
|
||||||
{
|
{
|
||||||
// 9301 (3001) = no crush, 9302 (3002) = crushing, 9303 = hurting touch
|
// 9301 (3001) = no crush, 9302 (3002) = crushing, 9303 = hurting touch
|
||||||
if (polyspawn->type >= SMT_POLYSPAWN && polyspawn->type <= SMT_POLYSPAWNHURT)
|
if (polyspawn->type >= SMT_PolySpawn && polyspawn->type <= SMT_PolySpawnHurt)
|
||||||
{
|
{
|
||||||
// Polyobj StartSpot Pt.
|
// Polyobj StartSpot Pt.
|
||||||
polyobjs[polyIndex].StartSpot.x = polyspawn->x;
|
polyobjs[polyIndex].StartSpot.x = polyspawn->x;
|
||||||
|
@ -1776,7 +1776,7 @@ void PO_Init (void)
|
||||||
for (polyspawn = polyspawns; polyspawn;)
|
for (polyspawn = polyspawns; polyspawn;)
|
||||||
{
|
{
|
||||||
polyspawns_t *next = polyspawn->next;
|
polyspawns_t *next = polyspawn->next;
|
||||||
if (polyspawn->type == SMT_POLYANCHOR)
|
if (polyspawn->type == SMT_PolyAnchor)
|
||||||
{
|
{
|
||||||
// Polyobj Anchor Pt.
|
// Polyobj Anchor Pt.
|
||||||
TranslateToStartSpot (polyspawn->angle, polyspawn->x, polyspawn->y);
|
TranslateToStartSpot (polyspawn->angle, polyspawn->x, polyspawn->y);
|
||||||
|
|
|
@ -26,6 +26,12 @@ DoomEdNums
|
||||||
1408 = "$SSeqOverride", 8
|
1408 = "$SSeqOverride", 8
|
||||||
1409 = "$SSeqOverride", 9
|
1409 = "$SSeqOverride", 9
|
||||||
1411 = "$SSeqOverride"
|
1411 = "$SSeqOverride"
|
||||||
|
1500 = "$VavoomFloor"
|
||||||
|
1501 = "$VavoomCeiling"
|
||||||
|
1502 = none
|
||||||
|
1503 = none
|
||||||
|
1504 = "$VertexFloorZ"
|
||||||
|
1505 = "$VertexCeilingZ"
|
||||||
5001 = PointPusher
|
5001 = PointPusher
|
||||||
5002 = PointPuller
|
5002 = PointPuller
|
||||||
5004 = FS_Mapspot
|
5004 = FS_Mapspot
|
||||||
|
@ -73,6 +79,28 @@ DoomEdNums
|
||||||
9301 = "$PolySpawn"
|
9301 = "$PolySpawn"
|
||||||
9302 = "$PolySpawnCrush"
|
9302 = "$PolySpawnCrush"
|
||||||
9303 = "$PolySpawnHurt"
|
9303 = "$PolySpawnHurt"
|
||||||
|
9500 = "$SlopeFloorPointLine"
|
||||||
|
9501 = "$SlopeCeilingPointLine"
|
||||||
|
9502 = "$SetFloorSlope"
|
||||||
|
9503 = "$SetCeilingSlope"
|
||||||
|
9510 = "$CopyFloorPlane"
|
||||||
|
9511 = "$CopyCeilingPlane"
|
||||||
|
9800 = none
|
||||||
|
9801 = none
|
||||||
|
9802 = none
|
||||||
|
9803 = none
|
||||||
|
9804 = none
|
||||||
|
9810 = none
|
||||||
|
9811 = none
|
||||||
|
9812 = none
|
||||||
|
9813 = none
|
||||||
|
9814 = none
|
||||||
|
9820 = none
|
||||||
|
9821 = none
|
||||||
|
9822 = none
|
||||||
|
9823 = none
|
||||||
|
9824 = none
|
||||||
|
9825 = none
|
||||||
9982 = SecActEyesAboveC
|
9982 = SecActEyesAboveC
|
||||||
9983 = SecActEyesBelowC
|
9983 = SecActEyesBelowC
|
||||||
9988 = CustomSprite
|
9988 = CustomSprite
|
||||||
|
|
Loading…
Reference in a new issue