mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-inside-top-bug' into 'master'
Fix THAT ONE Garden Top bug, which is also a bug with Rocket Sneakers Closes #610 See merge request KartKrew/Kart!1499
This commit is contained in:
commit
6ccaae4a0c
3 changed files with 32 additions and 13 deletions
|
|
@ -11388,7 +11388,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
break;
|
||||
case KITEM_GARDENTOP:
|
||||
if (ATTACK_IS_DOWN && NO_HYUDORO)
|
||||
if (player->curshield == KSHIELD_TOP && K_GetGardenTop(player) == NULL)
|
||||
{
|
||||
Obj_GardenTopDeploy(player->mo);
|
||||
}
|
||||
else if (ATTACK_IS_DOWN && NO_HYUDORO)
|
||||
{
|
||||
if (player->curshield != KSHIELD_TOP)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -411,6 +411,13 @@ anchor_top (mobj_t *top)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Rider lost track of this object. */
|
||||
if (rider_top(rider) != top)
|
||||
{
|
||||
P_RemoveMobj(top);
|
||||
return;
|
||||
}
|
||||
|
||||
tilt(top);
|
||||
|
||||
anchor(top, rider, rider->angle, 0);
|
||||
|
|
@ -578,18 +585,18 @@ Obj_GardenTopThrow (player_t *player)
|
|||
should fall off. */
|
||||
P_SetOrigin(player->mo, player->mo->x, player->mo->y,
|
||||
player->mo->z + height * P_MobjFlip(player->mo));
|
||||
|
||||
if (player->itemamount > 0)
|
||||
player->itemamount--;
|
||||
|
||||
if (player->itemamount <= 0)
|
||||
player->itemtype = KITEM_NONE;
|
||||
|
||||
player->curshield = KSHIELD_NONE;
|
||||
|
||||
player->mo->radius = K_DefaultPlayerRadius(player);
|
||||
}
|
||||
|
||||
if (player->itemamount > 0)
|
||||
player->itemamount--;
|
||||
|
||||
if (player->itemamount <= 0)
|
||||
player->itemtype = KITEM_NONE;
|
||||
|
||||
player->curshield = KSHIELD_NONE;
|
||||
|
||||
player->mo->radius = K_DefaultPlayerRadius(player);
|
||||
|
||||
return top;
|
||||
}
|
||||
|
||||
|
|
|
|||
12
src/p_mobj.c
12
src/p_mobj.c
|
|
@ -11339,13 +11339,21 @@ void P_RemoveMobj(mobj_t *mobj)
|
|||
|
||||
if (mobj->hnext && !P_MobjWasRemoved(mobj->hnext))
|
||||
{
|
||||
P_SetTarget(&mobj->hnext->hprev, mobj->hprev);
|
||||
if (mobj->hnext->hprev == mobj)
|
||||
{
|
||||
P_SetTarget(&mobj->hnext->hprev, mobj->hprev);
|
||||
}
|
||||
|
||||
P_SetTarget(&mobj->hnext, NULL);
|
||||
}
|
||||
|
||||
if (mobj->hprev && !P_MobjWasRemoved(mobj->hprev))
|
||||
{
|
||||
P_SetTarget(&mobj->hprev->hnext, cachenext);
|
||||
if (mobj->hprev->hnext == mobj)
|
||||
{
|
||||
P_SetTarget(&mobj->hprev->hnext, cachenext);
|
||||
}
|
||||
|
||||
P_SetTarget(&mobj->hprev, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue