Adapt setup of PolyObject move action

This commit is contained in:
MascaraSnake 2020-05-05 21:41:53 +02:00
parent 8e550cd423
commit b3a553513a
3 changed files with 40 additions and 8 deletions

View file

@ -1765,6 +1765,7 @@ udmf
title = "Return delay"; title = "Return delay";
} }
} }
481 481
{ {
title = "Door Swing"; title = "Door Swing";
@ -1789,6 +1790,31 @@ udmf
} }
} }
482
{
title = "Move";
prefix = "(482)";
arg0
{
title = "PolyObject ID";
type = 14;
}
arg1
{
title = "Speed";
}
arg2
{
title = "Distance";
}
arg3
{
title = "Override?";
type = 11;
enum = "noyes";
}
}
}
light light
{ {

View file

@ -2917,13 +2917,21 @@ 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 480: //PolyObject: Door slide
case 481: // PolyObject: Door swing case 481: //PolyObject: Door swing
lines[i].args[0] = lines[i].tag; lines[i].args[0] = lines[i].tag;
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS; 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[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); lines[i].args[3] = (lines[i].sidenum[1] == 0xffff) ? 0 : (sides[lines[i].sidenum[1]].textureoffset >> FRACBITS);
break; break;
case 482: //PolyObject: Move
case 483: //PolyObject: Move, override
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].special == 483);
lines[i].special = 482;
break;
case 606: //Colormap case 606: //Colormap
lines[i].args[0] = lines[i].tag; lines[i].args[0] = lines[i].tag;
break; break;

View file

@ -1108,12 +1108,11 @@ static boolean PolyMove(line_t *line)
{ {
polymovedata_t pmd; polymovedata_t pmd;
pmd.polyObjNum = line->tag; pmd.polyObjNum = line->args[0];
pmd.speed = sides[line->sidenum[0]].textureoffset / 8; pmd.speed = line->args[1] << (FRACBITS - 3);
pmd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y); pmd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y);
pmd.distance = sides[line->sidenum[0]].rowoffset; pmd.distance = line->args[2] << FRACBITS;
pmd.overRide = line->args[3]; // Polyobj_OR_Move
pmd.overRide = (line->special == 483); // Polyobj_OR_Move
return EV_DoPolyObjMove(&pmd); return EV_DoPolyObjMove(&pmd);
} }
@ -4002,7 +4001,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
PolyDoor(line); PolyDoor(line);
break; break;
case 482: // Polyobj_Move case 482: // Polyobj_Move
case 483: // Polyobj_OR_Move
PolyMove(line); PolyMove(line);
break; break;
case 484: // Polyobj_RotateRight case 484: // Polyobj_RotateRight