Obj_GardenTopThrow: reset item and shield even if Top object is missing

This commit is contained in:
James R. 2023-09-14 02:46:06 -07:00
parent a455822790
commit c8cf6a4621

View file

@ -585,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;
}