mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 06:13:18 +00:00
Adapt linedef type 405 and 407 to UDMF
This commit is contained in:
parent
53976e4b52
commit
8f39e23105
5 changed files with 23 additions and 19 deletions
|
@ -81,7 +81,7 @@ void T_MoveCeiling(ceiling_t *ceiling)
|
|||
ceiling->sector->ceilingpic = ceiling->texture;
|
||||
/* FALLTHRU */
|
||||
case raiseToHighest:
|
||||
case moveCeilingByFrontTexture:
|
||||
case moveCeilingByDistance:
|
||||
ceiling->sector->ceilingdata = NULL;
|
||||
ceiling->sector->ceilspeed = 0;
|
||||
P_RemoveThinker(&ceiling->thinker);
|
||||
|
@ -203,7 +203,7 @@ void T_MoveCeiling(ceiling_t *ceiling)
|
|||
/* FALLTHRU */
|
||||
|
||||
// in all other cases, just remove the active ceiling
|
||||
case moveCeilingByFrontTexture:
|
||||
case moveCeilingByDistance:
|
||||
ceiling->sector->ceilingdata = NULL;
|
||||
ceiling->sector->ceilspeed = 0;
|
||||
P_RemoveThinker(&ceiling->thinker);
|
||||
|
@ -498,19 +498,19 @@ INT32 EV_DoCeiling(mtag_t tag, line_t *line, ceiling_e type)
|
|||
ceiling->texture = (line->args[2] & 2) ? line->frontsector->ceilingpic : -1;
|
||||
break;
|
||||
|
||||
case moveCeilingByFrontTexture:
|
||||
if (line->flags & ML_NOCLIMB)
|
||||
case moveCeilingByDistance:
|
||||
if (line->args[4])
|
||||
ceiling->speed = INT32_MAX/2; // as above, "instant" is one tic
|
||||
else
|
||||
ceiling->speed = FixedDiv(sides[line->sidenum[0]].textureoffset,8*FRACUNIT); // texture x offset
|
||||
ceiling->speed = line->args[3] << (FRACBITS - 3);
|
||||
if (sides[line->sidenum[0]].rowoffset > 0)
|
||||
{
|
||||
ceiling->direction = 1; // up
|
||||
ceiling->topheight = sec->ceilingheight + sides[line->sidenum[0]].rowoffset; // texture y offset
|
||||
ceiling->topheight = sec->ceilingheight + (line->args[2] << FRACBITS);
|
||||
}
|
||||
else {
|
||||
ceiling->direction = -1; // down
|
||||
ceiling->bottomheight = sec->ceilingheight + sides[line->sidenum[0]].rowoffset; // texture y offset
|
||||
ceiling->bottomheight = sec->ceilingheight + (line->args[2] << FRACBITS);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -1885,12 +1885,12 @@ void EV_DoFloor(mtag_t tag, line_t *line, floor_e floortype)
|
|||
|
||||
break;
|
||||
|
||||
case moveFloorByFrontTexture:
|
||||
if (line->flags & ML_NOCLIMB)
|
||||
case moveFloorByDistance:
|
||||
if (line->args[4])
|
||||
dofloor->speed = INT32_MAX/2; // as above, "instant" is one tic
|
||||
else
|
||||
dofloor->speed = FixedDiv(sides[line->sidenum[0]].textureoffset,8*FRACUNIT); // texture x offset
|
||||
dofloor->floordestheight = sec->floorheight + sides[line->sidenum[0]].rowoffset; // texture y offset
|
||||
dofloor->speed = line->args[3] << (FRACBITS - 3);
|
||||
dofloor->floordestheight = sec->floorheight + (line->args[2] << FRACBITS);
|
||||
if (dofloor->floordestheight > sec->floorheight)
|
||||
dofloor->direction = 1; // up
|
||||
else
|
||||
|
|
|
@ -3543,6 +3543,11 @@ static void P_ConvertBinaryMap(void)
|
|||
case 405: //Move floor according to front texture offsets
|
||||
case 407: //Move ceiling according to front texture offsets
|
||||
lines[i].args[0] = tag;
|
||||
lines[i].args[1] = (lines[i].special == 405) ? 0 : 1;
|
||||
lines[i].args[2] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||
lines[i].args[3] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||
lines[i].args[4] = !!(lines[i].flags & ML_NOCLIMB);
|
||||
lines[i].special = 405;
|
||||
break;
|
||||
case 428: //Start platform movement
|
||||
lines[i].args[0] = tag;
|
||||
|
|
11
src/p_spec.c
11
src/p_spec.c
|
@ -2277,12 +2277,11 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
EV_DoCeiling(line->args[0], line, moveCeilingByFrontSector);
|
||||
break;
|
||||
|
||||
case 405: // Move floor by front side texture offsets, offset x = speed, offset y = amount to raise/lower
|
||||
EV_DoFloor(line->args[0], line, moveFloorByFrontTexture);
|
||||
break;
|
||||
|
||||
case 407: // Move ceiling by front side texture offsets, offset x = speed, offset y = amount to raise/lower
|
||||
EV_DoCeiling(line->args[0], line, moveCeilingByFrontTexture);
|
||||
case 405: // Move planes by distance
|
||||
if (line->args[1] != 1)
|
||||
EV_DoFloor(line->args[0], line, moveFloorByDistance);
|
||||
if (line->args[1] != 0)
|
||||
EV_DoCeiling(line->args[0], line, moveCeilingByDistance);
|
||||
break;
|
||||
|
||||
case 409: // Change tagged sectors' tag
|
||||
|
|
|
@ -271,7 +271,7 @@ typedef enum
|
|||
moveCeilingByFrontSector,
|
||||
instantMoveCeilingByFrontSector,
|
||||
|
||||
moveCeilingByFrontTexture,
|
||||
moveCeilingByDistance,
|
||||
|
||||
bounceCeiling,
|
||||
bounceCeilingCrush,
|
||||
|
@ -325,7 +325,7 @@ typedef enum
|
|||
moveFloorByFrontSector,
|
||||
instantMoveFloorByFrontSector,
|
||||
|
||||
moveFloorByFrontTexture,
|
||||
moveFloorByDistance,
|
||||
|
||||
bounceFloor,
|
||||
bounceFloorCrush,
|
||||
|
|
Loading…
Reference in a new issue