diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index 0e110cfb6..abe50c1b5 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -2434,23 +2434,15 @@ udmf } arg1 { - title = "Set heights?"; - type = 12; - enum - { - 1 = "Floor"; - 2 = "Ceiling"; - } + title = "Affected planes"; + type = 11; + enum = "floorceiling"; } arg2 { title = "Set flats?"; - type = 12; - enum - { - 1 = "Floor"; - 2 = "Ceiling"; - } + type = 11; + enum = "noyes"; } } diff --git a/src/p_ceilng.c b/src/p_ceilng.c index b64d496fb..ed385be33 100644 --- a/src/p_ceilng.c +++ b/src/p_ceilng.c @@ -273,27 +273,19 @@ INT32 EV_DoCeiling(mtag_t tag, line_t *line, ceiling_e type) case instantMoveCeilingByFrontSector: ceiling->speed = INT32_MAX/2; - if (lines->args[1] & 2) - { - if (line->frontsector->ceilingheight >= sec->ceilingheight) // Move up - { - ceiling->direction = 1; - ceiling->topheight = line->frontsector->ceilingheight; - } - else // Move down - { - ceiling->direction = -1; - ceiling->bottomheight = line->frontsector->ceilingheight; - } - } - else + if (line->frontsector->ceilingheight >= sec->ceilingheight) // Move up { ceiling->direction = 1; - ceiling->topheight = sec->ceilingheight; + ceiling->topheight = line->frontsector->ceilingheight; + } + else // Move down + { + ceiling->direction = -1; + ceiling->bottomheight = line->frontsector->ceilingheight; } // If flag is set, change ceiling texture after moving - ceiling->texture = (line->args[2] & 2) ? line->frontsector->ceilingpic : -1; + ceiling->texture = line->args[2] ? line->frontsector->ceilingpic : -1; break; case moveCeilingByDistance: diff --git a/src/p_floor.c b/src/p_floor.c index e388657cf..eebb9366e 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -1796,11 +1796,9 @@ void EV_DoFloor(mtag_t tag, line_t *line, floor_e floortype) dofloor->floordestheight = P_FindLowestFloorSurrounding(sec); break; - // Linedef executor command, linetype 101. - // Front sector floor = destination height. case instantMoveFloorByFrontSector: dofloor->speed = INT32_MAX/2; // as above, "instant" is one tic - dofloor->floordestheight = (line->args[1] & 1) ? line->frontsector->floorheight : sec->floorheight; + dofloor->floordestheight = line->frontsector->floorheight; if (dofloor->floordestheight >= sec->floorheight) dofloor->direction = 1; // up @@ -1808,7 +1806,7 @@ void EV_DoFloor(mtag_t tag, line_t *line, floor_e floortype) dofloor->direction = -1; // down // If flag is set, change floor texture after moving - dofloor->texture = (line->args[2] & 1) ? line->frontsector->floorpic : -1; + dofloor->texture = line->args[2] ? line->frontsector->floorpic : -1; break; case moveFloorByFrontSector: diff --git a/src/p_setup.c b/src/p_setup.c index 56c3ed78b..2b03fe173 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3548,8 +3548,8 @@ static void P_ConvertBinaryMap(void) case 400: //Set tagged sector's floor height/texture case 401: //Set tagged sector's ceiling height/texture lines[i].args[0] = tag; - lines[i].args[1] = lines[i].special - 399; - lines[i].args[2] = (lines[i].flags & ML_NOCLIMB) ? 0 : lines[i].special - 399; + lines[i].args[1] = lines[i].special - 400; + lines[i].args[2] = !!(lines[i].flags & ML_NOCLIMB); lines[i].special = 400; break; case 403: //Move tagged sector's floor diff --git a/src/p_spec.c b/src/p_spec.c index 66071d9c6..a3fdbe629 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2234,9 +2234,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) switch (line->special) { case 400: // Set tagged sector's heights/flats - if (line->args[1] & 1 || line->args[2] & 1) + if (line->args[1] != 1) EV_DoFloor(line->args[0], line, instantMoveFloorByFrontSector); - if (line->args[1] & 2 || line->args[2] & 2) + if (line->args[1] != 0) EV_DoCeiling(line->args[0], line, instantMoveCeilingByFrontSector); break;