diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index b534f52de..54dddb693 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -1765,6 +1765,7 @@ udmf title = "Return delay"; } } + 481 { 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 { diff --git a/src/p_setup.c b/src/p_setup.c index f814f0948..2d9fc5c39 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2917,13 +2917,21 @@ static void P_ConvertBinaryMap(void) case 456: //Stop fading colormap lines[i].args[0] = lines[i].tag; break; - case 480: // PolyObject: Door slide - case 481: // PolyObject: Door swing + 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 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 lines[i].args[0] = lines[i].tag; break; diff --git a/src/p_spec.c b/src/p_spec.c index 59821b684..d00414c0f 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1108,12 +1108,11 @@ static boolean PolyMove(line_t *line) { polymovedata_t pmd; - pmd.polyObjNum = line->tag; - pmd.speed = sides[line->sidenum[0]].textureoffset / 8; + pmd.polyObjNum = line->args[0]; + pmd.speed = line->args[1] << (FRACBITS - 3); pmd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y); - pmd.distance = sides[line->sidenum[0]].rowoffset; - - pmd.overRide = (line->special == 483); // Polyobj_OR_Move + pmd.distance = line->args[2] << FRACBITS; + pmd.overRide = line->args[3]; // Polyobj_OR_Move return EV_DoPolyObjMove(&pmd); } @@ -4002,7 +4001,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) PolyDoor(line); break; case 482: // Polyobj_Move - case 483: // Polyobj_OR_Move PolyMove(line); break; case 484: // Polyobj_RotateRight