Move polyobject crush option to the first line args

This commit is contained in:
MascaraSnake 2020-05-04 23:27:26 +02:00
parent 8c36b9efa5
commit df3ca712d8
7 changed files with 21 additions and 42 deletions

View file

@ -1549,6 +1549,7 @@ udmf
4 = "Stopped by pushables";
8 = "Don't render planes";
16 = "Trigger linedef executor on touch";
32 = "Crush player";
}
}
arg4

View file

@ -8745,7 +8745,6 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_ANGLEMAN",
"MT_POLYANCHOR",
"MT_POLYSPAWN",
"MT_POLYSPAWNCRUSH",
// Skybox objects
"MT_SKYBOX",

View file

@ -3351,7 +3351,7 @@ state_t states[NUMSTATES] =
// CTF Sign
{SPR_GFLG, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_GOTFLAG
// Finish flag
{SPR_FNSF, FF_TRANS30, -1, {NULL}, 0, 0, S_NULL}, // S_FINISHFLAG
@ -17999,7 +17999,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_FINISHFLAG
-1, // doomednum
S_FINISHFLAG, // spawnstate
@ -19844,7 +19844,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
S_NULL // raisestate
},
{ // MT_FLINGNIGHTSSTAR
-1, // doomednum
S_NIGHTSSTAR, // spawnstate
@ -20847,33 +20847,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
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
780, // doomednum
S_INVISIBLE, // spawnstate

View file

@ -3487,7 +3487,7 @@ typedef enum state
// Got Flag Sign
S_GOTFLAG,
// Finish flag
S_FINISHFLAG,
@ -4754,7 +4754,6 @@ typedef enum mobj_type
MT_ANGLEMAN,
MT_POLYANCHOR,
MT_POLYSPAWN,
MT_POLYSPAWNCRUSH,
// Skybox objects
MT_SKYBOX,

View file

@ -234,6 +234,10 @@ static void Polyobj_GetInfo(polyobj_t *po, line_t *line)
if (line->args[3] & TMPF_EXECUTOR) // Has a linedef executor
po->flags |= POF_LDEXEC;
// TODO: support customized damage somehow?
if (line->args[3] & TMPF_CRUSH)
po->damage = 3;
po->triggertag = line->args[4];
}
@ -473,10 +477,6 @@ static void Polyobj_spawnPolyObj(INT32 num, mobj_t *spawnSpot, INT32 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
// TODO: support customized thrust?
po->thrust = FRACUNIT;
@ -1306,8 +1306,7 @@ void Polyobj_InitLevel(void)
mo = (mobj_t *)th;
if (mo->info->doomednum == POLYOBJ_SPAWN_DOOMEDNUM ||
mo->info->doomednum == POLYOBJ_SPAWNCRUSH_DOOMEDNUM)
if (mo->info->doomednum == POLYOBJ_SPAWN_DOOMEDNUM)
{
++numPolyObjects;

View file

@ -26,7 +26,6 @@
#define POLYOBJ_ANCHOR_DOOMEDNUM 760
#define POLYOBJ_SPAWN_DOOMEDNUM 761
#define POLYOBJ_SPAWNCRUSH_DOOMEDNUM 762 // todo: REMOVE
#define POLYOBJ_START_LINE 20
@ -57,7 +56,8 @@ typedef enum
TMPF_PUSHABLESTOP = 1<<2,
TMPF_INVISIBLEPLANES = 1<<3,
TMPF_EXECUTOR = 1<<4,
//TMPF_DONTCLIPPLANES = 1<<5,
TMPF_CRUSH = 1<<5,
//TMPF_DONTCLIPPLANES = 1<<6,
} textmappolyobjectflags_t;
//

View file

@ -3019,9 +3019,17 @@ static void P_ConvertBinaryMap(void)
case 750:
case 760:
case 761:
case 762:
mapthings[i].tag = mapthings[i].angle;
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:
mapthings[i].tag = mapthings[i].extrainfo;
break;