mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-26 04:30:55 +00:00
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:
parent
25fb318a0b
commit
fe756d567e
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue