Make Item Breaker even more accurate to its Lua version

You can pick up boxes when you have yout item slot full
This commit is contained in:
NepDisk 2025-02-28 19:26:37 -05:00
parent 0e9b47601c
commit 18de286a2f
3 changed files with 14 additions and 22 deletions

View file

@ -269,7 +269,7 @@ boolean K_IsPlayerLosing(player_t *player)
INT32 winningpos = 1;
UINT8 i, pcount = 0;
if (itembreaker && numtargets == 0)
if (itembreaker && numgotboxes == 0)
return true; // Didn't even TRY?
if (itembreaker || bossinfo.boss)
@ -1534,25 +1534,6 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
if (P_IsDisplayPlayer(player))
S_StartSound(NULL, sfx_itrolf);
}
else if (itembreaker)
{
if (mashed)
{
K_KartGetItemResult(player, KITEM_POGOSPRING);
player->karthud[khud_itemblinkmode] = 1;
if (P_IsDisplayPlayer(player))
S_StartSound(NULL, sfx_itrolm);
}
else
{
K_KartGetItemResult(player, KITEM_SNEAKER);
player->karthud[khud_itemblinkmode] = 0;
if (P_IsDisplayPlayer(player))
S_StartSound(NULL, sfx_itrolf);
}
}
else
{
if (modeattacking || cv_tripleorbinaut.value) // Waited patiently? You get Orbinaut x3!

View file

@ -13004,8 +13004,19 @@ void A_ItemPop(mobj_t *actor)
//if (actor->info->deathsound)
//S_StartSound(remains, actor->info->deathsound);
if (!((gametyperules & GTR_BUMPERS) && actor->target->player->bumper <= 0) && !(itembreaker && numgotboxes >= 3))
if (!((gametyperules & GTR_BUMPERS) && actor->target->player->bumper <= 0) && !itembreaker)
{
actor->target->player->itemroulette = 1;
}
else if (itembreaker)
{
if (numgotboxes < 3)
{
actor->target->player->itemtype = KITEM_POGOSPRING;
actor->target->player->itemamount += 1;
}
}
// Let Ring-less maps in on the rings fun as well!
if ((K_RingsActive() == true) )

View file

@ -355,7 +355,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
special->flags &= ~MF_SPECIAL;
return;
case MT_RANDOMITEM:
if (!P_CanPickupItem(player, 1))
if (!itembreaker && !P_CanPickupItem(player, 1))
return;
if ((gametyperules & GTR_BUMPERS) && player->bumper <= 0)