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)

This commit is contained in:
toasterbabe 2017-07-12 14:01:16 +01:00
parent 25fb318a0b
commit fe756d567e

View file

@ -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);