mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add an extra fix for the "get hit the moment you spawn an orbiting item" bug that produced tiny Orbinauts and Jawz - now it moves them out so they're not inside you when you come out of hitlag.
(Yes, sorry, no more fishsticks.)
This commit is contained in:
parent
329c2a60a2
commit
5a06239a20
1 changed files with 11 additions and 0 deletions
11
src/k_kart.c
11
src/k_kart.c
|
|
@ -5637,6 +5637,17 @@ void K_DropHnextList(player_t *player, boolean keepshields)
|
|||
|
||||
if (orbit) // splay out
|
||||
{
|
||||
if (dropwork->destscale > work->destscale)
|
||||
{
|
||||
fixed_t radius = FixedMul(work->info->radius, dropwork->destscale);
|
||||
radius = FixedHypot(player->mo->radius, player->mo->radius) + FixedHypot(radius, radius); // mobj's distance from its Target, or Radius.
|
||||
dropwork->flags |= MF_NOCLIPTHING;
|
||||
work->momx = FixedMul(FINECOSINE(work->angle>>ANGLETOFINESHIFT), radius);
|
||||
work->momy = FixedMul(FINESINE(work->angle>>ANGLETOFINESHIFT), radius);
|
||||
P_MoveOrigin(dropwork, player->mo->x + work->momx, player->mo->y + work->momy, player->mo->z);
|
||||
dropwork->flags &= ~MF_NOCLIPTHING;
|
||||
}
|
||||
|
||||
dropwork->flags2 |= MF2_AMBUSH;
|
||||
|
||||
dropwork->z += flip;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue