mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 12:31:32 +00:00
Adapt setup of polyobject door actions
This commit is contained in:
parent
df3ca712d8
commit
8e550cd423
3 changed files with 66 additions and 16 deletions
|
@ -1739,6 +1739,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";
|
||||||
|
type = 8;
|
||||||
|
}
|
||||||
|
arg3
|
||||||
|
{
|
||||||
|
title = "Return delay";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
light
|
light
|
||||||
{
|
{
|
||||||
606
|
606
|
||||||
|
|
|
@ -2917,6 +2917,13 @@ static void P_ConvertBinaryMap(void)
|
||||||
case 456: //Stop fading colormap
|
case 456: //Stop fading colormap
|
||||||
lines[i].args[0] = lines[i].tag;
|
lines[i].args[0] = lines[i].tag;
|
||||||
break;
|
break;
|
||||||
|
case 480: // PolyObject: Door slide
|
||||||
|
case 481: // PolyObject: Door swing
|
||||||
|
lines[i].args[0] = lines[i].tag;
|
||||||
|
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
lines[i].args[2] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
lines[i].args[3] = (lines[i].sidenum[1] == 0xffff) ? 0 : (sides[lines[i].sidenum[1]].textureoffset >> FRACBITS);
|
||||||
|
break;
|
||||||
case 606: //Colormap
|
case 606: //Colormap
|
||||||
lines[i].args[0] = lines[i].tag;
|
lines[i].args[0] = lines[i].tag;
|
||||||
break;
|
break;
|
||||||
|
|
24
src/p_spec.c
24
src/p_spec.c
|
@ -1079,33 +1079,25 @@ static boolean PolyDoor(line_t *line)
|
||||||
{
|
{
|
||||||
polydoordata_t pdd;
|
polydoordata_t pdd;
|
||||||
|
|
||||||
pdd.polyObjNum = line->tag; // polyobject id
|
pdd.polyObjNum = line->args[0]; // polyobject id
|
||||||
|
|
||||||
switch(line->special)
|
switch(line->special)
|
||||||
{
|
{
|
||||||
case 480: // Polyobj_DoorSlide
|
case 480: // Polyobj_DoorSlide
|
||||||
pdd.doorType = POLY_DOOR_SLIDE;
|
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.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;
|
pdd.distance = line->args[2] << FRACBITS;
|
||||||
|
pdd.delay = line->args[3]; // delay in tics
|
||||||
if (line->sidenum[1] != 0xffff)
|
|
||||||
pdd.delay = sides[line->sidenum[1]].textureoffset >> FRACBITS; // delay in tics
|
|
||||||
else
|
|
||||||
pdd.delay = 0;
|
|
||||||
break;
|
break;
|
||||||
case 481: // Polyobj_DoorSwing
|
case 481: // Polyobj_DoorSwing
|
||||||
pdd.doorType = POLY_DOOR_SWING;
|
pdd.doorType = POLY_DOOR_SWING;
|
||||||
pdd.speed = sides[line->sidenum[0]].textureoffset >> FRACBITS; // angular speed
|
pdd.speed = line->args[1]; // angular speed
|
||||||
pdd.distance = sides[line->sidenum[0]].rowoffset >> FRACBITS; // angular distance
|
pdd.distance = line->args[2]; // angular distance
|
||||||
|
pdd.delay = line->args[3]; // delay in tics
|
||||||
if (line->sidenum[1] != 0xffff)
|
|
||||||
pdd.delay = sides[line->sidenum[1]].textureoffset >> FRACBITS; // delay in tics
|
|
||||||
else
|
|
||||||
pdd.delay = 0;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return 0; // ???
|
return false; // ???
|
||||||
}
|
}
|
||||||
|
|
||||||
return EV_DoPolyDoor(&pdd);
|
return EV_DoPolyDoor(&pdd);
|
||||||
|
|
Loading…
Reference in a new issue