mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Adapt moving platform linedef specials to UDMF
This commit is contained in:
parent
259700be3c
commit
770612bc9d
3 changed files with 86 additions and 9 deletions
|
@ -1566,6 +1566,44 @@ udmf
|
|||
}
|
||||
}
|
||||
|
||||
planemove
|
||||
{
|
||||
title = "Plane Movement";
|
||||
|
||||
60
|
||||
{
|
||||
title = "Activate Moving Platform";
|
||||
prefix = "(60)";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
type = 13;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Starting delay";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Delay before flip";
|
||||
}
|
||||
arg4
|
||||
{
|
||||
title = "Starting direction";
|
||||
type = 11;
|
||||
enum
|
||||
{
|
||||
0 = "Down";
|
||||
1 = "Up";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fofmodifiers
|
||||
{
|
||||
title = "FOF Modifiers";
|
||||
|
@ -2243,6 +2281,44 @@ udmf
|
|||
}
|
||||
}
|
||||
|
||||
linedefexecplane
|
||||
{
|
||||
title = "Linedef Executor (plane movement)";
|
||||
|
||||
428
|
||||
{
|
||||
title = "Start Platform Movement";
|
||||
prefix = "(428)";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
type = 13;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Starting delay";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Delay before flip";
|
||||
}
|
||||
arg4
|
||||
{
|
||||
title = "Starting direction";
|
||||
type = 11;
|
||||
enum
|
||||
{
|
||||
0 = "Down";
|
||||
1 = "Up";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linedefexecmisc
|
||||
{
|
||||
title = "Linedef Executor (misc.)";
|
||||
|
|
|
@ -2045,6 +2045,7 @@ void EV_DoElevator(mtag_t tag, line_t *line, elevator_e elevtype)
|
|||
elevator->type = elevtype;
|
||||
elevator->sourceline = line;
|
||||
elevator->distance = 1; // Always crush unless otherwise
|
||||
elevator->sector = sec;
|
||||
|
||||
// set up the fields according to the type of elevator action
|
||||
switch (elevtype)
|
||||
|
@ -2052,7 +2053,6 @@ void EV_DoElevator(mtag_t tag, line_t *line, elevator_e elevtype)
|
|||
// elevator down to next floor
|
||||
case elevateDown:
|
||||
elevator->direction = -1;
|
||||
elevator->sector = sec;
|
||||
elevator->speed = ELEVATORSPEED/2; // half speed
|
||||
elevator->floordestheight = P_FindNextLowestFloor(sec, sec->floorheight);
|
||||
break;
|
||||
|
@ -2060,7 +2060,6 @@ void EV_DoElevator(mtag_t tag, line_t *line, elevator_e elevtype)
|
|||
// elevator up to next floor
|
||||
case elevateUp:
|
||||
elevator->direction = 1;
|
||||
elevator->sector = sec;
|
||||
elevator->speed = ELEVATORSPEED/4; // quarter speed
|
||||
elevator->floordestheight = P_FindNextHighestFloor(sec, sec->floorheight);
|
||||
break;
|
||||
|
@ -2068,14 +2067,12 @@ void EV_DoElevator(mtag_t tag, line_t *line, elevator_e elevtype)
|
|||
// elevator up to highest floor
|
||||
case elevateHighest:
|
||||
elevator->direction = 1;
|
||||
elevator->sector = sec;
|
||||
elevator->speed = ELEVATORSPEED/4; // quarter speed
|
||||
elevator->floordestheight = P_FindHighestFloorSurrounding(sec);
|
||||
break;
|
||||
|
||||
// elevator to floor height of activating switch's front sector
|
||||
case elevateCurrent:
|
||||
elevator->sector = sec;
|
||||
elevator->speed = ELEVATORSPEED;
|
||||
elevator->floordestheight = line->frontsector->floorheight;
|
||||
elevator->direction = elevator->floordestheight > sec->floorheight? 1 : -1;
|
||||
|
@ -2085,8 +2082,7 @@ void EV_DoElevator(mtag_t tag, line_t *line, elevator_e elevtype)
|
|||
elevator->origspeed = line->args[1] << (FRACBITS - 2);
|
||||
elevator->speed = elevator->origspeed;
|
||||
|
||||
elevator->sector = sec;
|
||||
elevator->low = !(line->flags & ML_NOCLIMB); // go down first unless noclimb is on
|
||||
elevator->low = !line->args[4]; // go down first unless args[4] is set
|
||||
if (elevator->low)
|
||||
{
|
||||
elevator->direction = 1;
|
||||
|
@ -2100,13 +2096,12 @@ void EV_DoElevator(mtag_t tag, line_t *line, elevator_e elevtype)
|
|||
elevator->floorwasheight = elevator->sector->floorheight;
|
||||
elevator->ceilingwasheight = elevator->sector->ceilingheight;
|
||||
|
||||
elevator->delay = sides[line->sidenum[0]].textureoffset >> FRACBITS;
|
||||
elevator->delaytimer = sides[line->sidenum[0]].rowoffset >> FRACBITS; // Initial delay
|
||||
elevator->delay = line->args[3];
|
||||
elevator->delaytimer = line->args[2]; // Initial delay
|
||||
break;
|
||||
|
||||
case bridgeFall:
|
||||
elevator->direction = -1;
|
||||
elevator->sector = sec;
|
||||
elevator->speed = ELEVATORSPEED*4; // quadruple speed
|
||||
elevator->floordestheight = P_FindNextLowestFloor(sec, sec->floorheight);
|
||||
break;
|
||||
|
|
|
@ -3103,6 +3103,9 @@ static void P_ConvertBinaryMap(void)
|
|||
case 60: //Activate moving platform (adjustable speed)
|
||||
lines[i].args[0] = tag;
|
||||
lines[i].args[1] = (lines[i].special == 60) ? P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS : 8;
|
||||
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) ? 1 : 0;
|
||||
lines[i].special = 60;
|
||||
break;
|
||||
case 61: //Crusher (Ceiling to floor)
|
||||
|
@ -3525,6 +3528,9 @@ static void P_ConvertBinaryMap(void)
|
|||
case 428: //Start platform movement
|
||||
lines[i].args[0] = tag;
|
||||
lines[i].args[1] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
|
||||
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) ? 1 : 0;
|
||||
break;
|
||||
case 429: //Crush ceiling once
|
||||
case 430: //Crush floor once
|
||||
|
|
Loading…
Reference in a new issue