Fix linedef action 435 being terrible

This action has apparently always applied the carry scroll factor to both the carrying thinker and the scrolling thinker, so using this means that the conveyor's visual speed is significantly slower than intended and reversed.

Just ran into on a whim when working on the ACS example map
This commit is contained in:
Sally Coolatta 2023-01-07 01:29:40 -05:00
parent 0601579af3
commit 5cc8aa004b

View file

@ -3105,8 +3105,8 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
speed = args[1] << FRACBITS;
angle = FixedAngle(args[2] << FRACBITS) >> ANGLETOFINESHIFT;
dx = FixedMul(FixedMul(FINECOSINE(angle), speed) >> SCROLL_SHIFT, CARRYFACTOR);
dy = FixedMul(FixedMul( FINESINE(angle), speed) >> SCROLL_SHIFT, CARRYFACTOR);
dx = FixedMul(FINECOSINE(angle), speed) >> SCROLL_SHIFT;
dy = FixedMul( FINESINE(angle), speed) >> SCROLL_SHIFT;
for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next)
{
@ -3117,8 +3117,22 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
if (!Tag_Find(&sectors[scroller->affectee].tags, args[0]))
continue;
scroller->dx = dx;
scroller->dy = dy;
switch (scroller->type)
{
case sc_carry:
case sc_carry_ceiling:
{
scroller->dx = FixedMul(-dx, CARRYFACTOR);
scroller->dy = FixedMul(dy, CARRYFACTOR);
break;
}
default:
{
scroller->dx = dx;
scroller->dy = dy;
break;
}
}
}
}
break;