mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Merge branch 'damned-springpads' into v1.2-frankeinstein
This commit is contained in:
commit
99905a443e
1 changed files with 7 additions and 3 deletions
10
src/p_spec.c
10
src/p_spec.c
|
@ -3812,12 +3812,14 @@ DoneSection2:
|
||||||
{
|
{
|
||||||
const fixed_t hscale = mapobjectscale + (mapobjectscale - player->mo->scale);
|
const fixed_t hscale = mapobjectscale + (mapobjectscale - player->mo->scale);
|
||||||
const fixed_t minspeed = 24*hscale;
|
const fixed_t minspeed = 24*hscale;
|
||||||
|
angle_t pushangle = FixedHypot(player->mo->momx, player->mo->momy) ? R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy) : player->mo->angle;
|
||||||
|
// if we have no speed for SOME REASON, use the player's angle, otherwise we'd be forcefully thrusted to what I can only assume is angle 0
|
||||||
|
|
||||||
if (player->mo->eflags & MFE_SPRUNG)
|
if (player->mo->eflags & MFE_SPRUNG)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (player->speed < minspeed) // Push forward to prevent getting stuck
|
if (player->speed < minspeed) // Push forward to prevent getting stuck
|
||||||
P_InstaThrust(player->mo, player->mo->angle, minspeed);
|
P_InstaThrust(player->mo, pushangle, minspeed);
|
||||||
|
|
||||||
player->kartstuff[k_pogospring] = 1;
|
player->kartstuff[k_pogospring] = 1;
|
||||||
K_DoPogoSpring(player->mo, 0, 1);
|
K_DoPogoSpring(player->mo, 0, 1);
|
||||||
|
@ -3833,14 +3835,16 @@ DoneSection2:
|
||||||
const fixed_t hscale = mapobjectscale + (mapobjectscale - player->mo->scale);
|
const fixed_t hscale = mapobjectscale + (mapobjectscale - player->mo->scale);
|
||||||
const fixed_t minspeed = 24*hscale;
|
const fixed_t minspeed = 24*hscale;
|
||||||
const fixed_t maxspeed = 28*hscale;
|
const fixed_t maxspeed = 28*hscale;
|
||||||
|
angle_t pushangle = FixedHypot(player->mo->momx, player->mo->momy) ? R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy) : player->mo->angle;
|
||||||
|
// if we have no speed for SOME REASON, use the player's angle, otherwise we'd be forcefully thrusted to what I can only assume is angle 0
|
||||||
|
|
||||||
if (player->mo->eflags & MFE_SPRUNG)
|
if (player->mo->eflags & MFE_SPRUNG)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (player->speed > maxspeed) // Prevent overshooting jumps
|
if (player->speed > maxspeed) // Prevent overshooting jumps
|
||||||
P_InstaThrust(player->mo, R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy), maxspeed);
|
P_InstaThrust(player->mo, pushangle, maxspeed);
|
||||||
else if (player->speed < minspeed) // Push forward to prevent getting stuck
|
else if (player->speed < minspeed) // Push forward to prevent getting stuck
|
||||||
P_InstaThrust(player->mo, player->mo->angle, minspeed);
|
P_InstaThrust(player->mo, pushangle, minspeed);
|
||||||
|
|
||||||
player->kartstuff[k_pogospring] = 2;
|
player->kartstuff[k_pogospring] = 2;
|
||||||
K_DoPogoSpring(player->mo, 0, 1);
|
K_DoPogoSpring(player->mo, 0, 1);
|
||||||
|
|
Loading…
Reference in a new issue