start alt thunder
This commit is contained in:
parent
de87222d98
commit
b6af96cf41
5 changed files with 54 additions and 12 deletions
|
|
@ -93,7 +93,7 @@
|
|||
#define ASSET_HASH_TEXTURES_KART 0xb4211b2f32b6a291
|
||||
#define ASSET_HASH_CHARS_KART 0x1e68a3e01aa5c68b
|
||||
#define ASSET_HASH_MAPS_KART 0x38558ed00da41ce9
|
||||
#define ASSET_HASH_MAIN_PK3 0x9a54c263d9f325cd
|
||||
#define ASSET_HASH_MAIN_PK3 0x049b68caee0ba709
|
||||
#define ASSET_HASH_MAPPATCH_PK3 0x1745690024efbaf8
|
||||
#define ASSET_HASH_BONUSCHARS_KART 0x60e6f13d822a7461
|
||||
#ifdef USE_PATCH_FILE
|
||||
|
|
|
|||
|
|
@ -698,6 +698,8 @@ struct player_t
|
|||
|
||||
mobj_t *shieldtracer; // Blankart: Shield mobj
|
||||
|
||||
tic_t altthundercharge; // charge of Alt. Thunder Shield
|
||||
|
||||
UINT8 bubblecool; // Bubble Shield use cooldown
|
||||
UINT8 bubbleblowup; // Bubble Shield usage blowup
|
||||
UINT8 bubblehealth; // Bubble Shield health
|
||||
|
|
|
|||
|
|
@ -1505,6 +1505,10 @@ static void K_drawKartItem(void)
|
|||
|
||||
itembar = FixedDiv(stplyr->bubblehealth, MAXBUBBLEHEALTH);
|
||||
}
|
||||
else if (stplyr->altthundercharge > 0)
|
||||
{
|
||||
itembar = FixedDiv(stplyr->altthundercharge, ALTTHUNDERCHARGETIME);
|
||||
}
|
||||
else if (stplyr->bricktimer > 0)
|
||||
{
|
||||
if (leveltime & 2)
|
||||
|
|
|
|||
|
|
@ -2408,19 +2408,54 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
|||
S_StartSound(player->mo, sfx_s3k41);
|
||||
}
|
||||
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||
if (K_IsKartItemAlternate(KITEM_THUNDERSHIELD))
|
||||
{
|
||||
K_DoThunderShield(player);
|
||||
if (player->itemamount > 0)
|
||||
if (!HOLDING_ITEM && NO_HYUDORO)
|
||||
{
|
||||
// Why is this a conditional?
|
||||
// Thunder shield: the only item that allows you to
|
||||
// activate a mine while you're out of its radius,
|
||||
// the SAME tic it sets your itemamount to 0
|
||||
// ...:dumbestass:
|
||||
player->itemamount--;
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
K_BotResetItemConfirm(player, false);
|
||||
if (buttons & BT_ATTACK)
|
||||
{
|
||||
player->itemflags &= ~IF_HOLDREADY;
|
||||
player->altthundercharge++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->altthundercharge)
|
||||
{
|
||||
if (player->altthundercharge >= ALTTHUNDERCHARGETIME)
|
||||
{
|
||||
K_DoThunderShield(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
if (player->itemamount > 0)
|
||||
{
|
||||
player->itemamount--;
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
K_BotResetItemConfirm(player, false);
|
||||
}
|
||||
}
|
||||
player->itemflags |= IF_HOLDREADY;
|
||||
player->altthundercharge = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||
{
|
||||
K_DoThunderShield(player);
|
||||
if (player->itemamount > 0)
|
||||
{
|
||||
// Why is this a conditional?
|
||||
// Thunder shield: the only item that allows you to
|
||||
// activate a mine while you're out of its radius,
|
||||
// the SAME tic it sets your itemamount to 0
|
||||
// ...:dumbestass:
|
||||
player->itemamount--;
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
K_BotResetItemConfirm(player, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ extern consvar_t cv_karteggmine_slotbrick;
|
|||
extern consvar_t cv_kartthunder_radius;
|
||||
|
||||
#define BUBBLEBOOSTTIME (7 * sneakertime / 10)
|
||||
#define ALTTHUNDERCHARGETIME ((92*TICRATE)/60)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
|
|
|||
Loading…
Reference in a new issue