mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Adapt polyobject door move linedef types to UDMF
This commit is contained in:
parent
805bafd936
commit
3b1d64703d
3 changed files with 66 additions and 15 deletions
|
@ -2746,6 +2746,57 @@ udmf
|
|||
}
|
||||
}
|
||||
|
||||
linedefexecpoly
|
||||
{
|
||||
title = "Linedef Executor (polyobject)";
|
||||
|
||||
480
|
||||
{
|
||||
title = "Door Slide";
|
||||
prefix = "(480)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Distance";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Return delay";
|
||||
}
|
||||
}
|
||||
481
|
||||
{
|
||||
title = "Door Swing";
|
||||
prefix = "(481)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Angle distance";
|
||||
type = 8;
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Return delay";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scrollpush
|
||||
{
|
||||
title = "Scrollers and Pushers";
|
||||
|
|
|
@ -3663,6 +3663,14 @@ static void P_ConvertBinaryMap(void)
|
|||
case 456: //Stop fading colormap
|
||||
lines[i].args[0] = Tag_FGet(&lines[i].tags);
|
||||
break;
|
||||
case 480: //Polyobject - door slide
|
||||
case 481: //Polyobject - door move
|
||||
lines[i].args[0] = tag;
|
||||
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||
lines[i].args[2] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||
if (lines[i].sidenum[1] != 0xffff)
|
||||
lines[i].args[3] = sides[lines[i].sidenum[1]].textureoffset >> FRACBITS;
|
||||
break;
|
||||
case 500: //Scroll front wall left
|
||||
case 501: //Scroll front wall right
|
||||
lines[i].args[0] = 0;
|
||||
|
|
22
src/p_spec.c
22
src/p_spec.c
|
@ -992,30 +992,22 @@ static boolean PolyDoor(line_t *line)
|
|||
{
|
||||
polydoordata_t pdd;
|
||||
|
||||
pdd.polyObjNum = Tag_FGet(&line->tags); // polyobject id
|
||||
pdd.polyObjNum = line->args[0]; // polyobject id
|
||||
|
||||
switch(line->special)
|
||||
{
|
||||
case 480: // Polyobj_DoorSlide
|
||||
pdd.doorType = POLY_DOOR_SLIDE;
|
||||
pdd.speed = sides[line->sidenum[0]].textureoffset / 8;
|
||||
pdd.speed = line->args[1] << (FRACBITS - 3);
|
||||
pdd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y); // angle of motion
|
||||
pdd.distance = sides[line->sidenum[0]].rowoffset;
|
||||
|
||||
if (line->sidenum[1] != 0xffff)
|
||||
pdd.delay = sides[line->sidenum[1]].textureoffset >> FRACBITS; // delay in tics
|
||||
else
|
||||
pdd.delay = 0;
|
||||
pdd.distance = line->args[2] << FRACBITS;
|
||||
pdd.delay = line->args[3]; // delay in tics
|
||||
break;
|
||||
case 481: // Polyobj_DoorSwing
|
||||
pdd.doorType = POLY_DOOR_SWING;
|
||||
pdd.speed = sides[line->sidenum[0]].textureoffset >> FRACBITS; // angular speed
|
||||
pdd.distance = sides[line->sidenum[0]].rowoffset >> FRACBITS; // angular distance
|
||||
|
||||
if (line->sidenum[1] != 0xffff)
|
||||
pdd.delay = sides[line->sidenum[1]].textureoffset >> FRACBITS; // delay in tics
|
||||
else
|
||||
pdd.delay = 0;
|
||||
pdd.speed = line->args[1]; // angular speed
|
||||
pdd.distance = line->args[2]; // angular distance
|
||||
pdd.delay = line->args[3]; // delay in tics
|
||||
break;
|
||||
default:
|
||||
return 0; // ???
|
||||
|
|
Loading…
Reference in a new issue