mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Update polyobject executors (480-492) for ACS
- 480, 483: These originated from Hexen but were set to use line->angle in SRB2, so I reverted them to use args like Hexen again (although using straight-forward integers instead of wacky byte angles) - 30, 31, 32 ... I edited these because I thought they were executors, oops, but I kept my changes anyway because using args directly is always more convenient than wrangling linedef angles in the map. - The rest: Usage is completely unchanged.
This commit is contained in:
parent
e48f154bfd
commit
87a0f81b61
2 changed files with 152 additions and 131 deletions
|
|
@ -4120,20 +4120,24 @@ static void P_ConvertBinaryLinedefTypes(void)
|
||||||
case 30: //Polyobject - waving flag
|
case 30: //Polyobject - waving flag
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = tag;
|
||||||
lines[i].args[1] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
|
lines[i].args[1] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
|
||||||
lines[i].args[2] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
lines[i].args[2] = AngleFixed(lines[i].angle) >> FRACBITS;
|
||||||
|
lines[i].args[3] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
break;
|
break;
|
||||||
case 31: //Polyobject - displacement by front sector
|
case 31: //Polyobject - displacement by front sector
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = tag;
|
||||||
lines[i].args[1] = R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
lines[i].args[1] = 0;
|
||||||
|
lines[i].args[2] = R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
||||||
|
lines[i].args[3] = R_PointToAngle2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
||||||
break;
|
break;
|
||||||
case 32: //Polyobject - angular displacement by front sector
|
case 32: //Polyobject - angular displacement by front sector
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = tag;
|
||||||
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset ? sides[lines[i].sidenum[0]].textureoffset >> FRACBITS : 128;
|
lines[i].args[1] = 0;
|
||||||
lines[i].args[2] = sides[lines[i].sidenum[0]].rowoffset ? sides[lines[i].sidenum[0]].rowoffset >> FRACBITS : 90;
|
lines[i].args[2] = sides[lines[i].sidenum[0]].textureoffset ? sides[lines[i].sidenum[0]].textureoffset >> FRACBITS : 128;
|
||||||
|
lines[i].args[3] = sides[lines[i].sidenum[0]].rowoffset ? sides[lines[i].sidenum[0]].rowoffset >> FRACBITS : 90;
|
||||||
if (lines[i].flags & ML_NOCLIMB)
|
if (lines[i].flags & ML_NOCLIMB)
|
||||||
lines[i].args[3] |= TMPR_DONTROTATEOTHERS;
|
lines[i].args[4] |= TMPR_DONTROTATEOTHERS;
|
||||||
else if (lines[i].flags & ML_MIDSOLID)
|
else if (lines[i].flags & ML_MIDSOLID)
|
||||||
lines[i].args[3] |= TMPR_ROTATEPLAYERS;
|
lines[i].args[4] |= TMPR_ROTATEPLAYERS;
|
||||||
break;
|
break;
|
||||||
case 50: //Instantly lower floor on level load
|
case 50: //Instantly lower floor on level load
|
||||||
case 51: //Instantly raise ceiling on level load
|
case 51: //Instantly raise ceiling on level load
|
||||||
|
|
@ -5416,7 +5420,14 @@ static void P_ConvertBinaryLinedefTypes(void)
|
||||||
lines[i].args[3] = !!(lines[i].flags & ML_MIDPEG);
|
lines[i].args[3] = !!(lines[i].flags & ML_MIDPEG);
|
||||||
break;
|
break;
|
||||||
case 480: //Polyobject - door slide
|
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] = AngleFixed(R_PointToAngle2(lines[i].v1->x, lines[i].v1->y, lines[i].v2->x, lines[i].v2->y)) >> FRACBITS;
|
||||||
|
lines[i].args[3] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
if (lines[i].sidenum[1] != 0xffff)
|
||||||
|
lines[i].args[4] = sides[lines[i].sidenum[1]].textureoffset >> FRACBITS;
|
||||||
|
break;
|
||||||
|
case 481: //Polyobject - door swing
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = 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;
|
||||||
|
|
@ -5427,8 +5438,9 @@ static void P_ConvertBinaryLinedefTypes(void)
|
||||||
case 483: //Polyobject - move, override
|
case 483: //Polyobject - move, override
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = 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] = AngleFixed(R_PointToAngle2(lines[i].v1->x, lines[i].v1->y, lines[i].v2->x, lines[i].v2->y)) >> FRACBITS;
|
||||||
lines[i].args[3] = lines[i].special == 483;
|
lines[i].args[3] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
lines[i].args[4] = lines[i].special == 483;
|
||||||
lines[i].special = 482;
|
lines[i].special = 482;
|
||||||
break;
|
break;
|
||||||
case 484: //Polyobject - rotate right
|
case 484: //Polyobject - rotate right
|
||||||
|
|
|
||||||
253
src/p_spec.c
253
src/p_spec.c
|
|
@ -975,52 +975,53 @@ static sector_t *P_FindModelCeilingSector(fixed_t ceildestheight, INT32 secnum)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Parses arguments for parameterized polyobject door types
|
// Parses arguments for parameterized polyobject door types
|
||||||
static boolean PolyDoor(line_t *line)
|
static boolean PolyDoor(INT32 *args)
|
||||||
{
|
{
|
||||||
polydoordata_t pdd;
|
polydoordata_t pdd;
|
||||||
|
|
||||||
pdd.polyObjNum = line->args[0]; // polyobject id
|
pdd.polyObjNum = args[0]; // polyobject id
|
||||||
|
|
||||||
switch(line->special)
|
pdd.doorType = POLY_DOOR_SLIDE;
|
||||||
{
|
pdd.speed = args[1] << (FRACBITS - 3);
|
||||||
case 480: // Polyobj_DoorSlide
|
pdd.angle = FixedAngle(args[2] << FRACBITS); // angle of motion
|
||||||
pdd.doorType = POLY_DOOR_SLIDE;
|
pdd.distance = args[3] << FRACBITS;
|
||||||
pdd.speed = line->args[1] << (FRACBITS - 3);
|
pdd.delay = args[4]; // delay in tics
|
||||||
pdd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y); // angle of motion
|
|
||||||
pdd.distance = line->args[2] << FRACBITS;
|
return EV_DoPolyDoor(&pdd);
|
||||||
pdd.delay = line->args[3]; // delay in tics
|
}
|
||||||
break;
|
|
||||||
case 481: // Polyobj_DoorSwing
|
static boolean PolyDoorSwing(INT32 *args)
|
||||||
pdd.doorType = POLY_DOOR_SWING;
|
{
|
||||||
pdd.speed = line->args[1]; // angular speed
|
polydoordata_t pdd;
|
||||||
pdd.distance = line->args[2]; // angular distance
|
|
||||||
pdd.delay = line->args[3]; // delay in tics
|
pdd.polyObjNum = args[0]; // polyobject id
|
||||||
break;
|
|
||||||
default:
|
pdd.doorType = POLY_DOOR_SWING;
|
||||||
return 0; // ???
|
pdd.speed = args[1]; // angular speed
|
||||||
}
|
pdd.distance = args[2]; // angular distance
|
||||||
|
pdd.delay = args[3]; // delay in tics
|
||||||
|
|
||||||
return EV_DoPolyDoor(&pdd);
|
return EV_DoPolyDoor(&pdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses arguments for parameterized polyobject move special
|
// Parses arguments for parameterized polyobject move special
|
||||||
static boolean PolyMove(line_t *line)
|
static boolean PolyMove(INT32 *args)
|
||||||
{
|
{
|
||||||
polymovedata_t pmd;
|
polymovedata_t pmd;
|
||||||
|
|
||||||
pmd.polyObjNum = line->args[0];
|
pmd.polyObjNum = args[0];
|
||||||
pmd.speed = line->args[1] << (FRACBITS - 3);
|
pmd.speed = args[1] << (FRACBITS - 3);
|
||||||
pmd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y);
|
pmd.angle = FixedAngle(args[2] << FRACBITS);
|
||||||
pmd.distance = line->args[2] << FRACBITS;
|
pmd.distance = args[3] << FRACBITS;
|
||||||
|
|
||||||
pmd.overRide = !!line->args[3]; // Polyobj_OR_Move
|
pmd.overRide = !!args[4]; // Polyobj_OR_Move
|
||||||
|
|
||||||
return EV_DoPolyObjMove(&pmd);
|
return EV_DoPolyObjMove(&pmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PolySetVisibilityTangibility(line_t *line)
|
static void PolySetVisibilityTangibility(INT32 *args)
|
||||||
{
|
{
|
||||||
INT32 polyObjNum = line->args[0];
|
INT32 polyObjNum = args[0];
|
||||||
polyobj_t* po;
|
polyobj_t* po;
|
||||||
|
|
||||||
if (!(po = Polyobj_GetForNum(polyObjNum)))
|
if (!(po = Polyobj_GetForNum(polyObjNum)))
|
||||||
|
|
@ -1033,27 +1034,27 @@ static void PolySetVisibilityTangibility(line_t *line)
|
||||||
if (po->isBad)
|
if (po->isBad)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (line->args[1] == TMPV_VISIBLE)
|
if (args[1] == TMPV_VISIBLE)
|
||||||
{
|
{
|
||||||
po->flags &= ~POF_NOSPECIALS;
|
po->flags &= ~POF_NOSPECIALS;
|
||||||
po->flags |= (po->spawnflags & POF_RENDERALL);
|
po->flags |= (po->spawnflags & POF_RENDERALL);
|
||||||
}
|
}
|
||||||
else if (line->args[1] == TMPV_INVISIBLE)
|
else if (args[1] == TMPV_INVISIBLE)
|
||||||
{
|
{
|
||||||
po->flags |= POF_NOSPECIALS;
|
po->flags |= POF_NOSPECIALS;
|
||||||
po->flags &= ~POF_RENDERALL;
|
po->flags &= ~POF_RENDERALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line->args[2] == TMPT_TANGIBLE)
|
if (args[2] == TMPT_TANGIBLE)
|
||||||
po->flags |= POF_SOLID;
|
po->flags |= POF_SOLID;
|
||||||
else if (line->args[2] == TMPT_INTANGIBLE)
|
else if (args[2] == TMPT_INTANGIBLE)
|
||||||
po->flags &= ~POF_SOLID;
|
po->flags &= ~POF_SOLID;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the translucency of a polyobject
|
// Sets the translucency of a polyobject
|
||||||
static void PolyTranslucency(line_t *line)
|
static void PolyTranslucency(INT32 *args)
|
||||||
{
|
{
|
||||||
INT32 polyObjNum = line->args[0];
|
INT32 polyObjNum = args[0];
|
||||||
polyobj_t *po;
|
polyobj_t *po;
|
||||||
|
|
||||||
if (!(po = Polyobj_GetForNum(polyObjNum)))
|
if (!(po = Polyobj_GetForNum(polyObjNum)))
|
||||||
|
|
@ -1066,18 +1067,18 @@ static void PolyTranslucency(line_t *line)
|
||||||
if (po->isBad)
|
if (po->isBad)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (lines->args[2]) // relative calc
|
if (args[2]) // relative calc
|
||||||
po->translucency += line->args[1];
|
po->translucency += args[1];
|
||||||
else
|
else
|
||||||
po->translucency = line->args[1];
|
po->translucency = args[1];
|
||||||
|
|
||||||
po->translucency = max(min(po->translucency, NUMTRANSMAPS), 0);
|
po->translucency = max(min(po->translucency, NUMTRANSMAPS), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Makes a polyobject translucency fade and applies tangibility
|
// Makes a polyobject translucency fade and applies tangibility
|
||||||
static boolean PolyFade(line_t *line)
|
static boolean PolyFade(INT32 *args)
|
||||||
{
|
{
|
||||||
INT32 polyObjNum = line->args[0];
|
INT32 polyObjNum = args[0];
|
||||||
polyobj_t *po;
|
polyobj_t *po;
|
||||||
polyfadedata_t pfd;
|
polyfadedata_t pfd;
|
||||||
|
|
||||||
|
|
@ -1092,7 +1093,7 @@ static boolean PolyFade(line_t *line)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Prevent continuous execs from interfering on an existing fade
|
// Prevent continuous execs from interfering on an existing fade
|
||||||
if (!(line->args[3] & TMPF_OVERRIDE)
|
if (!(args[3] & TMPF_OVERRIDE)
|
||||||
&& po->thinker
|
&& po->thinker
|
||||||
&& po->thinker->function.acp1 == (actionf_p1)T_PolyObjFade)
|
&& po->thinker->function.acp1 == (actionf_p1)T_PolyObjFade)
|
||||||
{
|
{
|
||||||
|
|
@ -1102,10 +1103,10 @@ static boolean PolyFade(line_t *line)
|
||||||
|
|
||||||
pfd.polyObjNum = polyObjNum;
|
pfd.polyObjNum = polyObjNum;
|
||||||
|
|
||||||
if (line->args[3] & TMPF_RELATIVE) // relative calc
|
if (args[3] & TMPF_RELATIVE) // relative calc
|
||||||
pfd.destvalue = po->translucency + line->args[1];
|
pfd.destvalue = po->translucency + args[1];
|
||||||
else
|
else
|
||||||
pfd.destvalue = line->args[1];
|
pfd.destvalue = args[1];
|
||||||
|
|
||||||
pfd.destvalue = max(min(pfd.destvalue, NUMTRANSMAPS), 0);
|
pfd.destvalue = max(min(pfd.destvalue, NUMTRANSMAPS), 0);
|
||||||
|
|
||||||
|
|
@ -1113,88 +1114,129 @@ static boolean PolyFade(line_t *line)
|
||||||
if (po->translucency == pfd.destvalue)
|
if (po->translucency == pfd.destvalue)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
pfd.docollision = !(line->args[3] & TMPF_IGNORECOLLISION); // do not handle collision flags
|
pfd.docollision = !(args[3] & TMPF_IGNORECOLLISION); // do not handle collision flags
|
||||||
pfd.doghostfade = (line->args[3] & TMPF_GHOSTFADE); // do ghost fade (no collision flags during fade)
|
pfd.doghostfade = (args[3] & TMPF_GHOSTFADE); // do ghost fade (no collision flags during fade)
|
||||||
pfd.ticbased = (line->args[3] & TMPF_TICBASED); // Speed = Tic Duration
|
pfd.ticbased = (args[3] & TMPF_TICBASED); // Speed = Tic Duration
|
||||||
|
|
||||||
pfd.speed = line->args[2];
|
pfd.speed = args[2];
|
||||||
|
|
||||||
return EV_DoPolyObjFade(&pfd);
|
return EV_DoPolyObjFade(&pfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses arguments for parameterized polyobject waypoint movement
|
// Parses arguments for parameterized polyobject waypoint movement
|
||||||
static boolean PolyWaypoint(line_t *line)
|
static boolean PolyWaypoint(INT32 *args)
|
||||||
{
|
{
|
||||||
polywaypointdata_t pwd;
|
polywaypointdata_t pwd;
|
||||||
|
|
||||||
pwd.polyObjNum = line->args[0];
|
pwd.polyObjNum = args[0];
|
||||||
pwd.speed = line->args[1] << (FRACBITS - 3);
|
pwd.speed = args[1] << (FRACBITS - 3);
|
||||||
pwd.sequence = line->args[2];
|
pwd.sequence = args[2];
|
||||||
pwd.returnbehavior = line->args[3];
|
pwd.returnbehavior = args[3];
|
||||||
pwd.flags = line->args[4];
|
pwd.flags = args[4];
|
||||||
|
|
||||||
return EV_DoPolyObjWaypoint(&pwd);
|
return EV_DoPolyObjWaypoint(&pwd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses arguments for parameterized polyobject rotate special
|
// Parses arguments for parameterized polyobject rotate special
|
||||||
static boolean PolyRotate(line_t *line)
|
static boolean PolyRotate(INT32 *args)
|
||||||
{
|
{
|
||||||
polyrotdata_t prd;
|
polyrotdata_t prd;
|
||||||
|
|
||||||
prd.polyObjNum = line->args[0];
|
prd.polyObjNum = args[0];
|
||||||
prd.speed = line->args[1]; // angular speed
|
prd.speed = args[1]; // angular speed
|
||||||
prd.distance = abs(line->args[2]); // angular distance
|
prd.distance = abs(args[2]); // angular distance
|
||||||
prd.direction = (line->args[2] < 0) ? -1 : 1;
|
prd.direction = (args[2] < 0) ? -1 : 1;
|
||||||
prd.flags = line->args[3];
|
prd.flags = args[3];
|
||||||
|
|
||||||
return EV_DoPolyObjRotate(&prd);
|
return EV_DoPolyObjRotate(&prd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses arguments for polyobject flag waving special
|
// Parses arguments for polyobject flag waving special
|
||||||
static boolean PolyFlag(line_t *line)
|
static boolean PolyFlag(INT32 *args)
|
||||||
{
|
{
|
||||||
polyflagdata_t pfd;
|
polyflagdata_t pfd;
|
||||||
|
|
||||||
pfd.polyObjNum = line->args[0];
|
pfd.polyObjNum = args[0];
|
||||||
pfd.speed = line->args[1];
|
pfd.speed = args[1];
|
||||||
pfd.angle = line->angle >> ANGLETOFINESHIFT;
|
pfd.angle = FixedAngle(args[2] << FRACBITS) >> ANGLETOFINESHIFT;
|
||||||
pfd.momx = line->args[2];
|
pfd.momx = args[3];
|
||||||
|
|
||||||
return EV_DoPolyObjFlag(&pfd);
|
return EV_DoPolyObjFlag(&pfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses arguments for parameterized polyobject move-by-sector-heights specials
|
// Parses arguments for parameterized polyobject move-by-sector-heights specials
|
||||||
static boolean PolyDisplace(line_t *line)
|
static boolean PolyDisplace(INT32 *args, line_t *fallback)
|
||||||
{
|
{
|
||||||
polydisplacedata_t pdd;
|
polydisplacedata_t pdd;
|
||||||
fixed_t length = R_PointToDist2(line->v2->x, line->v2->y, line->v1->x, line->v1->y);
|
fixed_t speed;
|
||||||
fixed_t speed = line->args[1] << FRACBITS;
|
angle_t angle;
|
||||||
|
|
||||||
pdd.polyObjNum = line->args[0];
|
pdd.polyObjNum = args[0];
|
||||||
|
|
||||||
pdd.controlSector = line->frontsector;
|
if (args[1] == 0)
|
||||||
pdd.dx = FixedMul(FixedDiv(line->dx, length), speed) >> 8;
|
{
|
||||||
pdd.dy = FixedMul(FixedDiv(line->dy, length), speed) >> 8;
|
if (fallback == NULL)
|
||||||
|
{
|
||||||
|
CONS_Debug(DBG_GAMELOGIC, "PolyDisplace: No frontsector to displace from!\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
pdd.controlSector = fallback->frontsector;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
INT32 destsec = Tag_Iterate_Sectors(args[1], 0);
|
||||||
|
if (destsec == -1)
|
||||||
|
{
|
||||||
|
CONS_Debug(DBG_GAMELOGIC, "PolyDisplace: No tagged sector to displace from (tag %d)!\n", args[1]);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
pdd.controlSector = §ors[destsec];
|
||||||
|
}
|
||||||
|
|
||||||
|
speed = args[2] << FRACBITS;
|
||||||
|
angle = FixedAngle(args[3] << FRACBITS) >> ANGLETOFINESHIFT;
|
||||||
|
|
||||||
|
pdd.dx = FixedMul(FINECOSINE(angle), speed) >> 8;
|
||||||
|
pdd.dy = FixedMul( FINESINE(angle), speed) >> 8;
|
||||||
|
|
||||||
return EV_DoPolyObjDisplace(&pdd);
|
return EV_DoPolyObjDisplace(&pdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses arguments for parameterized polyobject rotate-by-sector-heights specials
|
// Parses arguments for parameterized polyobject rotate-by-sector-heights specials
|
||||||
static boolean PolyRotDisplace(line_t *line)
|
static boolean PolyRotDisplace(INT32 *args, line_t *fallback)
|
||||||
{
|
{
|
||||||
polyrotdisplacedata_t pdd;
|
polyrotdisplacedata_t pdd;
|
||||||
fixed_t anginter, distinter;
|
fixed_t anginter, distinter;
|
||||||
|
|
||||||
pdd.polyObjNum = line->args[0];
|
pdd.polyObjNum = args[0];
|
||||||
pdd.controlSector = line->frontsector;
|
|
||||||
|
if (args[1] == 0)
|
||||||
|
{
|
||||||
|
if (fallback == NULL)
|
||||||
|
{
|
||||||
|
CONS_Debug(DBG_GAMELOGIC, "PolyRotDisplace: No frontsector to displace from!\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
pdd.controlSector = fallback->frontsector;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
INT32 destsec = Tag_Iterate_Sectors(args[1], 0);
|
||||||
|
if (destsec == -1)
|
||||||
|
{
|
||||||
|
CONS_Debug(DBG_GAMELOGIC, "PolyRotDisplace: No tagged sector to displace from (tag %d)!\n", args[1]);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
pdd.controlSector = §ors[destsec];
|
||||||
|
}
|
||||||
|
|
||||||
// Rotate 'anginter' interval for each 'distinter' interval from the control sector.
|
// Rotate 'anginter' interval for each 'distinter' interval from the control sector.
|
||||||
anginter = line->args[2] << FRACBITS;
|
distinter = args[2] << FRACBITS;
|
||||||
distinter = line->args[1] << FRACBITS;
|
anginter = args[3] << FRACBITS;
|
||||||
pdd.rotscale = FixedDiv(anginter, distinter);
|
pdd.rotscale = FixedDiv(anginter, distinter);
|
||||||
|
|
||||||
// Same behavior as other rotators when carrying things.
|
// Same behavior as other rotators when carrying things.
|
||||||
pdd.turnobjs = line->args[3];
|
pdd.turnobjs = args[4];
|
||||||
|
|
||||||
return EV_DoPolyObjRotDisplace(&pdd);
|
return EV_DoPolyObjRotDisplace(&pdd);
|
||||||
}
|
}
|
||||||
|
|
@ -3869,61 +3911,28 @@ void P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, char *
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 480: // Polyobj_DoorSlide
|
case 480: // Polyobj_DoorSlide
|
||||||
|
PolyDoor(args);
|
||||||
|
break;
|
||||||
case 481: // Polyobj_DoorSwing
|
case 481: // Polyobj_DoorSwing
|
||||||
if (line == NULL)
|
PolyDoorSwing(args);
|
||||||
{
|
|
||||||
break; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
PolyDoor(line);
|
|
||||||
break;
|
break;
|
||||||
case 482: // Polyobj_Move
|
case 482: // Polyobj_Move
|
||||||
if (line == NULL)
|
PolyMove(args);
|
||||||
{
|
|
||||||
break; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
PolyMove(line);
|
|
||||||
break;
|
break;
|
||||||
case 484: // Polyobj_RotateRight
|
case 484: // Polyobj_RotateRight
|
||||||
if (line == NULL)
|
PolyRotate(args);
|
||||||
{
|
|
||||||
break; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
PolyRotate(line);
|
|
||||||
break;
|
break;
|
||||||
case 488: // Polyobj_Waypoint
|
case 488: // Polyobj_Waypoint
|
||||||
if (line == NULL)
|
PolyWaypoint(args);
|
||||||
{
|
|
||||||
break; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
PolyWaypoint(line);
|
|
||||||
break;
|
break;
|
||||||
case 489:
|
case 489:
|
||||||
if (line == NULL)
|
PolySetVisibilityTangibility(args);
|
||||||
{
|
|
||||||
break; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
PolySetVisibilityTangibility(line);
|
|
||||||
break;
|
break;
|
||||||
case 491:
|
case 491:
|
||||||
if (line == NULL)
|
PolyTranslucency(args);
|
||||||
{
|
|
||||||
break; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
PolyTranslucency(line);
|
|
||||||
break;
|
break;
|
||||||
case 492:
|
case 492:
|
||||||
if (line == NULL)
|
PolyFade(args);
|
||||||
{
|
|
||||||
break; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
PolyFade(line);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
|
|
@ -6929,15 +6938,15 @@ void P_SpawnSpecialsThatRequireObjects(boolean fromnetsave)
|
||||||
switch (lines[i].special)
|
switch (lines[i].special)
|
||||||
{
|
{
|
||||||
case 30: // Polyobj_Flag
|
case 30: // Polyobj_Flag
|
||||||
PolyFlag(&lines[i]);
|
PolyFlag(lines[i].args);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31: // Polyobj_Displace
|
case 31: // Polyobj_Displace
|
||||||
PolyDisplace(&lines[i]);
|
PolyDisplace(lines[i].args, &lines[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32: // Polyobj_RotDisplace
|
case 32: // Polyobj_RotDisplace
|
||||||
PolyRotDisplace(&lines[i]);
|
PolyRotDisplace(lines[i].args, &lines[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 80: // Raise tagged things by type to this FOF
|
case 80: // Raise tagged things by type to this FOF
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue