From fe756d567e2a18fc3930c7c690b866a32a309943 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Wed, 12 Jul 2017 14:01:16 +0100 Subject: [PATCH] Add a "bias" to collision with chain ferris wheels to make it more likely that you'll grab one nearer to the center if you could potentially hit two in the next frame (previously was blockmap order dependent, which was never consistent) --- src/p_inter.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/p_inter.c b/src/p_inter.c index 99289165b..972d19216 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1471,6 +1471,15 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (player->powers[pw_flashing]) return; + if (special->movefactor && special->tracer && (angle_t)special->tracer->health != ANGLE_90 && (angle_t)special->tracer->health != ANGLE_270) + { // I don't expect you to understand this, Mr Bond... + angle_t ang = R_PointToAngle2(special->x, special->y, toucher->x, toucher->y) - special->tracer->threshold; + if ((special->movefactor > 0) == ((angle_t)special->tracer->health > ANGLE_90 && (angle_t)special->tracer->health < ANGLE_270)) + ang += ANGLE_180; + if (ang < ANGLE_180) + return; // I expect you to die. + } + P_ResetPlayer(player); P_SetTarget(&toucher->tracer, special);