mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-31 05:20:51 +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 targz;
|
||||
fixed_t speed;
|
||||
fixed_t dist = radius/2;
|
||||
fixed_t dist;
|
||||
|
||||
cur->flags &= ~MF_NOCLIPTHING;
|
||||
|
||||
|
@ -3014,15 +3014,25 @@ static void K_MoveHeldObjects(player_t *player)
|
|||
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)
|
||||
{
|
||||
targ = cur->hprev;
|
||||
dist = radius/4;
|
||||
dist = cur->extravalue1/4;
|
||||
}
|
||||
else
|
||||
dist = cur->extravalue1/2;
|
||||
|
||||
if (!targ || P_MobjWasRemoved(targ))
|
||||
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;
|
||||
targx = targ->x + P_ReturnThrustX(cur, ang + ANGLE_180, dist);
|
||||
targy = targ->y + P_ReturnThrustY(cur, ang + ANGLE_180, dist);
|
||||
|
|
Loading…
Reference in a new issue