mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-07 08:51:40 +00:00
Apply to bananas, eggmen, and mines also
This commit is contained in:
parent
2e8f513eb5
commit
b973522bf1
1 changed files with 12 additions and 2 deletions
14
src/k_kart.c
14
src/k_kart.c
|
@ -3004,7 +3004,7 @@ static void K_MoveHeldObjects(player_t *player)
|
||||||
fixed_t targy;
|
fixed_t targy;
|
||||||
fixed_t targz;
|
fixed_t targz;
|
||||||
fixed_t speed;
|
fixed_t speed;
|
||||||
fixed_t dist = radius/2;
|
fixed_t dist;
|
||||||
|
|
||||||
cur->flags &= ~MF_NOCLIPTHING;
|
cur->flags &= ~MF_NOCLIPTHING;
|
||||||
|
|
||||||
|
@ -3014,15 +3014,25 @@ static void K_MoveHeldObjects(player_t *player)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cur->extravalue1 < radius)
|
||||||
|
cur->extravalue1 += FixedMul(P_AproxDistance(cur->extravalue1, radius), FRACUNIT/12);
|
||||||
|
if (cur->extravalue1 > radius)
|
||||||
|
cur->extravalue1 = radius;
|
||||||
|
|
||||||
if (cur != player->mo->hnext)
|
if (cur != player->mo->hnext)
|
||||||
{
|
{
|
||||||
targ = cur->hprev;
|
targ = cur->hprev;
|
||||||
dist = radius/4;
|
dist = cur->extravalue1/4;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
dist = cur->extravalue1/2;
|
||||||
|
|
||||||
if (!targ || P_MobjWasRemoved(targ))
|
if (!targ || P_MobjWasRemoved(targ))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Shrink your items if the player shrunk too.
|
||||||
|
P_SetScale(cur, (cur->destscale = FixedMul(FixedDiv(cur->extravalue1, radius), player->mo->scale)));
|
||||||
|
|
||||||
ang = targ->angle;
|
ang = targ->angle;
|
||||||
targx = targ->x + P_ReturnThrustX(cur, ang + ANGLE_180, dist);
|
targx = targ->x + P_ReturnThrustX(cur, ang + ANGLE_180, dist);
|
||||||
targy = targ->y + P_ReturnThrustY(cur, ang + ANGLE_180, dist);
|
targy = targ->y + P_ReturnThrustY(cur, ang + ANGLE_180, dist);
|
||||||
|
|
Loading…
Reference in a new issue