mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fixItemUnderflow' into 'master'
Fix item amount underflow on item deflect See merge request KartKrew/RingRacers!23
This commit is contained in:
commit
52a32e0296
1 changed files with 8 additions and 8 deletions
16
src/k_kart.c
16
src/k_kart.c
|
|
@ -12857,9 +12857,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
else if (ATTACK_IS_DOWN && (player->itemflags & IF_ITEMOUT)) // Banana x3 thrown
|
||||
{
|
||||
player->itemamount--;
|
||||
K_ThrowKartItem(player, false, MT_BANANA, -1, 0, 0);
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->itemamount--;
|
||||
K_UpdateHnextList(player, false);
|
||||
player->botvars.itemconfirm = 0;
|
||||
}
|
||||
|
|
@ -12923,9 +12923,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
else if (ATTACK_IS_DOWN && (player->itemflags & IF_ITEMOUT)) // Orbinaut x3 thrown
|
||||
{
|
||||
player->itemamount--;
|
||||
K_ThrowKartItem(player, true, MT_ORBINAUT, 1, 0, 0);
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->itemamount--;
|
||||
K_UpdateHnextList(player, false);
|
||||
player->botvars.itemconfirm = 0;
|
||||
}
|
||||
|
|
@ -12966,9 +12966,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
else if (ATTACK_IS_DOWN && HOLDING_ITEM && (player->itemflags & IF_ITEMOUT)) // Jawz thrown
|
||||
{
|
||||
player->itemamount--;
|
||||
K_ThrowKartItem(player, true, MT_JAWZ, 1, 0, 0);
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->itemamount--;
|
||||
K_UpdateHnextList(player, false);
|
||||
player->botvars.itemconfirm = 0;
|
||||
}
|
||||
|
|
@ -12994,9 +12994,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
else if (ATTACK_IS_DOWN && (player->itemflags & IF_ITEMOUT))
|
||||
{
|
||||
player->itemamount--;
|
||||
K_ThrowKartItem(player, false, MT_SSMINE, 1, 1, 0);
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->itemamount--;
|
||||
player->itemflags &= ~IF_ITEMOUT;
|
||||
K_UpdateHnextList(player, true);
|
||||
player->botvars.itemconfirm = 0;
|
||||
|
|
@ -13032,9 +13032,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
else if (ATTACK_IS_DOWN && (player->itemflags & IF_ITEMOUT))
|
||||
{
|
||||
player->itemamount--;
|
||||
K_ThrowKartItem(player, (player->throwdir > 0), MT_DROPTARGET, -1, 0, 0);
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->itemamount--;
|
||||
player->itemflags &= ~IF_ITEMOUT;
|
||||
K_UpdateHnextList(player, true);
|
||||
player->botvars.itemconfirm = 0;
|
||||
|
|
@ -13276,6 +13276,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
|
||||
if (player->bubbleblowup > bubbletime*2)
|
||||
{
|
||||
player->itemamount--;
|
||||
K_ThrowKartItem(player, (player->throwdir > 0), MT_BUBBLESHIELDTRAP, -1, 0, 0);
|
||||
if (player->throwdir == -1)
|
||||
{
|
||||
|
|
@ -13288,7 +13289,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
player->bubbleblowup = 0;
|
||||
player->bubblecool = 0;
|
||||
player->itemflags &= ~IF_HOLDREADY;
|
||||
player->itemamount--;
|
||||
player->botvars.itemconfirm = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -13454,9 +13454,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
else if (ATTACK_IS_DOWN && HOLDING_ITEM && (player->itemflags & IF_ITEMOUT)) // Sink thrown
|
||||
{
|
||||
player->itemamount--;
|
||||
K_ThrowKartItem(player, false, MT_SINK, 1, 2, 0);
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->itemamount--;
|
||||
player->itemflags &= ~IF_ITEMOUT;
|
||||
K_UpdateHnextList(player, true);
|
||||
player->botvars.itemconfirm = 0;
|
||||
|
|
@ -13465,11 +13465,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
case KITEM_GACHABOM:
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||
{
|
||||
player->itemamount--;
|
||||
K_SetItemOut(player); // need this to set itemscale
|
||||
K_ThrowKartItem(player, true, MT_GACHABOM, 0, 0, 0);
|
||||
K_UnsetItemOut(player);
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->itemamount--;
|
||||
player->roundconditions.gachabom_miser = (
|
||||
(player->roundconditions.gachabom_miser == 0)
|
||||
? 1 : 0xFF
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue