diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index 039507404..ff25fee2c 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -1569,6 +1569,25 @@ udmf type = 15; } } + + 30 + { + title = "Waving Flag"; + prefix = "(30)"; + arg0 + { + title = "PolyObject ID"; + type = 14; + } + arg1 + { + title = "Speed"; + } + arg2 + { + title = "Distance"; + } + } } planemove diff --git a/src/p_setup.c b/src/p_setup.c index a6c650fc5..2b2efd0f8 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3081,6 +3081,11 @@ static void P_ConvertBinaryMap(void) break; } + case 30: //Polyobject - waving flag + 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]].textureoffset >> FRACBITS; + break; case 50: //Instantly lower floor on level load case 51: //Instantly raise ceiling on level load lines[i].args[0] = tag; diff --git a/src/p_spec.c b/src/p_spec.c index b5f67fedb..b98b244b3 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1189,10 +1189,10 @@ static boolean PolyFlag(line_t *line) { polyflagdata_t pfd; - pfd.polyObjNum = Tag_FGet(&line->tags); - pfd.speed = P_AproxDistance(line->dx, line->dy) >> FRACBITS; + pfd.polyObjNum = line->args[0]; + pfd.speed = line->args[1]; pfd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y) >> ANGLETOFINESHIFT; - pfd.momx = sides[line->sidenum[0]].textureoffset >> FRACBITS; + pfd.momx = line->args[2]; return EV_DoPolyObjFlag(&pfd); }