mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-17 23:21:05 +00:00
Port over double-press Grow cancel from internal
This commit is contained in:
parent
54af8f5fc0
commit
2d8461a59d
1 changed files with 18 additions and 8 deletions
26
src/k_kart.c
26
src/k_kart.c
|
@ -2141,7 +2141,7 @@ static void K_RemoveGrowShrink(player_t *player)
|
||||||
}
|
}
|
||||||
|
|
||||||
player->kartstuff[k_growshrinktimer] = 0;
|
player->kartstuff[k_growshrinktimer] = 0;
|
||||||
player->kartstuff[k_growcancel] = 0;
|
player->kartstuff[k_growcancel] = -1;
|
||||||
|
|
||||||
P_RestoreMusic(player);
|
P_RestoreMusic(player);
|
||||||
}
|
}
|
||||||
|
@ -5311,14 +5311,24 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
// Grow Canceling
|
// Grow Canceling
|
||||||
else if (player->kartstuff[k_growshrinktimer] > 0)
|
else if (player->kartstuff[k_growshrinktimer] > 0)
|
||||||
{
|
{
|
||||||
if (cmd->buttons & BT_ATTACK)
|
if (player->kartstuff[k_growcancel] >= 0)
|
||||||
{
|
{
|
||||||
player->kartstuff[k_growcancel]++;
|
if (cmd->buttons & BT_ATTACK)
|
||||||
if (player->kartstuff[k_growcancel] > 26)
|
{
|
||||||
K_RemoveGrowShrink(player);
|
player->kartstuff[k_growcancel]++;
|
||||||
|
if (player->kartstuff[k_growcancel] > 26)
|
||||||
|
K_RemoveGrowShrink(player);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
player->kartstuff[k_growcancel] = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
player->kartstuff[k_growcancel] = 0;
|
{
|
||||||
|
if ((cmd->buttons & BT_ATTACK) || (player->pflags & PF_ATTACKDOWN))
|
||||||
|
player->kartstuff[k_growcancel] = -1;
|
||||||
|
else
|
||||||
|
player->kartstuff[k_growcancel] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (player->kartstuff[k_itemamount] <= 0)
|
else if (player->kartstuff[k_itemamount] <= 0)
|
||||||
{
|
{
|
||||||
|
@ -5683,7 +5693,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->kartstuff[k_curshield] = 0;
|
player->kartstuff[k_curshield] = 0;
|
||||||
|
|
||||||
if (player->kartstuff[k_growshrinktimer] <= 0)
|
if (player->kartstuff[k_growshrinktimer] <= 0)
|
||||||
player->kartstuff[k_growcancel] = 0;
|
player->kartstuff[k_growcancel] = -1;
|
||||||
|
|
||||||
if (player->kartstuff[k_itemtype] == KITEM_SPB
|
if (player->kartstuff[k_itemtype] == KITEM_SPB
|
||||||
|| player->kartstuff[k_itemtype] == KITEM_SHRINK
|
|| player->kartstuff[k_itemtype] == KITEM_SHRINK
|
||||||
|
@ -6868,7 +6878,7 @@ static void K_drawKartItem(void)
|
||||||
}
|
}
|
||||||
else if (stplyr->kartstuff[k_growshrinktimer] > 0)
|
else if (stplyr->kartstuff[k_growshrinktimer] > 0)
|
||||||
{
|
{
|
||||||
if (stplyr->kartstuff[k_growcancel])
|
if (stplyr->kartstuff[k_growcancel] > 0)
|
||||||
{
|
{
|
||||||
itembar = stplyr->kartstuff[k_growcancel];
|
itembar = stplyr->kartstuff[k_growcancel];
|
||||||
maxl = 26;
|
maxl = 26;
|
||||||
|
|
Loading…
Reference in a new issue