Move polyobject crush option to the first line args
This commit is contained in:
parent
8c36b9efa5
commit
df3ca712d8
|
@ -1549,6 +1549,7 @@ udmf
|
||||||
4 = "Stopped by pushables";
|
4 = "Stopped by pushables";
|
||||||
8 = "Don't render planes";
|
8 = "Don't render planes";
|
||||||
16 = "Trigger linedef executor on touch";
|
16 = "Trigger linedef executor on touch";
|
||||||
|
32 = "Crush player";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arg4
|
arg4
|
||||||
|
|
|
@ -8745,7 +8745,6 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_ANGLEMAN",
|
"MT_ANGLEMAN",
|
||||||
"MT_POLYANCHOR",
|
"MT_POLYANCHOR",
|
||||||
"MT_POLYSPAWN",
|
"MT_POLYSPAWN",
|
||||||
"MT_POLYSPAWNCRUSH",
|
|
||||||
|
|
||||||
// Skybox objects
|
// Skybox objects
|
||||||
"MT_SKYBOX",
|
"MT_SKYBOX",
|
||||||
|
|
27
src/info.c
27
src/info.c
|
@ -20847,33 +20847,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_POLYSPAWNCRUSH
|
|
||||||
762, // doomednum
|
|
||||||
S_INVISIBLE, // spawnstate
|
|
||||||
1, // spawnhealth
|
|
||||||
S_NULL, // seestate
|
|
||||||
sfx_None, // seesound
|
|
||||||
0, // reactiontime
|
|
||||||
sfx_None, // attacksound
|
|
||||||
S_NULL, // painstate
|
|
||||||
3, // painchance
|
|
||||||
sfx_None, // painsound
|
|
||||||
S_NULL, // meleestate
|
|
||||||
S_NULL, // missilestate
|
|
||||||
S_NULL, // deathstate
|
|
||||||
S_NULL, // xdeathstate
|
|
||||||
sfx_None, // deathsound
|
|
||||||
0, // speed
|
|
||||||
1*FRACUNIT, // radius
|
|
||||||
1*FRACUNIT, // height
|
|
||||||
0, // display offset
|
|
||||||
1000, // mass
|
|
||||||
8, // damage
|
|
||||||
sfx_None, // activesound
|
|
||||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY|MF_NOCLIP, // flags
|
|
||||||
S_NULL // raisestate
|
|
||||||
},
|
|
||||||
|
|
||||||
{ // MT_SKYBOX
|
{ // MT_SKYBOX
|
||||||
780, // doomednum
|
780, // doomednum
|
||||||
S_INVISIBLE, // spawnstate
|
S_INVISIBLE, // spawnstate
|
||||||
|
|
|
@ -4754,7 +4754,6 @@ typedef enum mobj_type
|
||||||
MT_ANGLEMAN,
|
MT_ANGLEMAN,
|
||||||
MT_POLYANCHOR,
|
MT_POLYANCHOR,
|
||||||
MT_POLYSPAWN,
|
MT_POLYSPAWN,
|
||||||
MT_POLYSPAWNCRUSH,
|
|
||||||
|
|
||||||
// Skybox objects
|
// Skybox objects
|
||||||
MT_SKYBOX,
|
MT_SKYBOX,
|
||||||
|
|
|
@ -234,6 +234,10 @@ static void Polyobj_GetInfo(polyobj_t *po, line_t *line)
|
||||||
if (line->args[3] & TMPF_EXECUTOR) // Has a linedef executor
|
if (line->args[3] & TMPF_EXECUTOR) // Has a linedef executor
|
||||||
po->flags |= POF_LDEXEC;
|
po->flags |= POF_LDEXEC;
|
||||||
|
|
||||||
|
// TODO: support customized damage somehow?
|
||||||
|
if (line->args[3] & TMPF_CRUSH)
|
||||||
|
po->damage = 3;
|
||||||
|
|
||||||
po->triggertag = line->args[4];
|
po->triggertag = line->args[4];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,10 +477,6 @@ static void Polyobj_spawnPolyObj(INT32 num, mobj_t *spawnSpot, INT32 id)
|
||||||
|
|
||||||
po->id = id;
|
po->id = id;
|
||||||
|
|
||||||
// TODO: support customized damage somehow?
|
|
||||||
if (spawnSpot->info->doomednum == POLYOBJ_SPAWNCRUSH_DOOMEDNUM)
|
|
||||||
po->damage = 3;
|
|
||||||
|
|
||||||
// set to default thrust; may be modified by attached thinkers
|
// set to default thrust; may be modified by attached thinkers
|
||||||
// TODO: support customized thrust?
|
// TODO: support customized thrust?
|
||||||
po->thrust = FRACUNIT;
|
po->thrust = FRACUNIT;
|
||||||
|
@ -1306,8 +1306,7 @@ void Polyobj_InitLevel(void)
|
||||||
|
|
||||||
mo = (mobj_t *)th;
|
mo = (mobj_t *)th;
|
||||||
|
|
||||||
if (mo->info->doomednum == POLYOBJ_SPAWN_DOOMEDNUM ||
|
if (mo->info->doomednum == POLYOBJ_SPAWN_DOOMEDNUM)
|
||||||
mo->info->doomednum == POLYOBJ_SPAWNCRUSH_DOOMEDNUM)
|
|
||||||
{
|
{
|
||||||
++numPolyObjects;
|
++numPolyObjects;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#define POLYOBJ_ANCHOR_DOOMEDNUM 760
|
#define POLYOBJ_ANCHOR_DOOMEDNUM 760
|
||||||
#define POLYOBJ_SPAWN_DOOMEDNUM 761
|
#define POLYOBJ_SPAWN_DOOMEDNUM 761
|
||||||
#define POLYOBJ_SPAWNCRUSH_DOOMEDNUM 762 // todo: REMOVE
|
|
||||||
|
|
||||||
#define POLYOBJ_START_LINE 20
|
#define POLYOBJ_START_LINE 20
|
||||||
|
|
||||||
|
@ -57,7 +56,8 @@ typedef enum
|
||||||
TMPF_PUSHABLESTOP = 1<<2,
|
TMPF_PUSHABLESTOP = 1<<2,
|
||||||
TMPF_INVISIBLEPLANES = 1<<3,
|
TMPF_INVISIBLEPLANES = 1<<3,
|
||||||
TMPF_EXECUTOR = 1<<4,
|
TMPF_EXECUTOR = 1<<4,
|
||||||
//TMPF_DONTCLIPPLANES = 1<<5,
|
TMPF_CRUSH = 1<<5,
|
||||||
|
//TMPF_DONTCLIPPLANES = 1<<6,
|
||||||
} textmappolyobjectflags_t;
|
} textmappolyobjectflags_t;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -3019,9 +3019,17 @@ static void P_ConvertBinaryMap(void)
|
||||||
case 750:
|
case 750:
|
||||||
case 760:
|
case 760:
|
||||||
case 761:
|
case 761:
|
||||||
case 762:
|
|
||||||
mapthings[i].tag = mapthings[i].angle;
|
mapthings[i].tag = mapthings[i].angle;
|
||||||
break;
|
break;
|
||||||
|
case 762:
|
||||||
|
{
|
||||||
|
INT32 firstline = P_FindSpecialLineFromTag(20, mapthings[i].angle, -1);
|
||||||
|
if (firstline != -1)
|
||||||
|
lines[firstline].args[3] |= TMPF_CRUSH;
|
||||||
|
mapthings[i].tag = mapthings[i].angle;
|
||||||
|
mapthings[i].type = 761;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 780:
|
case 780:
|
||||||
mapthings[i].tag = mapthings[i].extrainfo;
|
mapthings[i].tag = mapthings[i].extrainfo;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue