From 5cc8aa004bbf61058ce6b2362a8a5534dfcf057d Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sat, 7 Jan 2023 01:29:40 -0500 Subject: [PATCH] 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 --- src/p_spec.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 9865b7c6b..7f7325481 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -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(§ors[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;