Update executor 435 for ACS

This commit is contained in:
Sally Coolatta 2022-12-27 07:43:38 -05:00
parent 7d177a9157
commit e8dff8f12a
2 changed files with 5 additions and 9 deletions

View file

@ -5163,6 +5163,7 @@ static void P_ConvertBinaryLinedefTypes(void)
case 435: //Change plane scroller direction
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[2] = AngleFixed(R_PointToAngle2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y)) >> FRACBITS;
break;
case 436: //Shatter FOF
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;

View file

@ -2878,20 +2878,15 @@ void P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, char *
scroll_t *scroller;
thinker_t *th;
fixed_t length;
fixed_t speed;
angle_t angle;
fixed_t dx;
fixed_t dy;
if (line == NULL)
{
break; // TODO
}
length = R_PointToDist2(line->v2->x, line->v2->y, line->v1->x, line->v1->y);
speed = args[1] << FRACBITS;
dx = FixedMul(FixedMul(FixedDiv(line->dx, length), speed) >> SCROLL_SHIFT, CARRYFACTOR);
dy = FixedMul(FixedMul(FixedDiv(line->dy, length), speed) >> SCROLL_SHIFT, CARRYFACTOR);
angle = FixedAngle(args[2] << FRACBITS) >> ANGLETOFINESHIFT;
dx = FixedMul(FixedMul(FINECOSINE(angle), speed) >> SCROLL_SHIFT, CARRYFACTOR);
dy = FixedMul(FixedMul( FINESINE(angle), speed) >> SCROLL_SHIFT, CARRYFACTOR);
for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next)
{