mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make Eggman Mark actually work
This commit is contained in:
parent
79813f1398
commit
534026764c
2 changed files with 27 additions and 11 deletions
|
|
@ -131,7 +131,6 @@ Do with it whatever you want.
|
|||
Run this macro, then #undef FOREACH afterward
|
||||
*/
|
||||
#define KART_ITEM_ITERATOR \
|
||||
FOREACH (EGGEXPLODE, -2),\
|
||||
FOREACH (SAD, -1),\
|
||||
FOREACH (NONE, 0),\
|
||||
FOREACH (SNEAKER, 1),\
|
||||
|
|
|
|||
|
|
@ -738,6 +738,7 @@ static void K_InitRoulette(itemroulette_t *const roulette)
|
|||
roulette->elapsed = 0;
|
||||
roulette->tics = roulette->speed = 3; // Some default speed
|
||||
roulette->active = true;
|
||||
roulette->eggman = false;
|
||||
}
|
||||
|
||||
static void K_PushToRouletteItemList(itemroulette_t *const roulette, kartitems_t item)
|
||||
|
|
@ -898,9 +899,7 @@ void K_StartItemRoulette(player_t *const player, itemroulette_t *const roulette)
|
|||
void K_StartEggmanRoulette(player_t *const player)
|
||||
{
|
||||
itemroulette_t *const roulette = &player->itemRoulette;
|
||||
|
||||
K_InitRoulette(roulette);
|
||||
K_PushToRouletteItemList(roulette, KITEM_EGGEXPLODE);
|
||||
K_StartItemRoulette(player, roulette);
|
||||
roulette->eggman = true;
|
||||
}
|
||||
|
||||
|
|
@ -964,14 +963,32 @@ void K_KartItemRoulette(player_t *const player, ticcmd_t *const cmd)
|
|||
// Finally, if you get past this check, now you can actually start calculating what item you get.
|
||||
if (confirmItem == true && (player->pflags & (PF_ITEMOUT|PF_EGGMANOUT|PF_USERINGS)) == 0)
|
||||
{
|
||||
kartitems_t finalItem = roulette->itemList[ roulette->index ];
|
||||
|
||||
K_KartGetItemResult(player, finalItem);
|
||||
player->karthud[khud_itemblink] = TICRATE;
|
||||
|
||||
if (P_IsDisplayPlayer(player) && !demo.freecam)
|
||||
if (roulette->eggman == true)
|
||||
{
|
||||
S_StartSound(NULL, sfx_itrolf);
|
||||
// FATASS JUMPSCARE instead of your actual item
|
||||
player->eggmanexplode = 4*TICRATE;
|
||||
|
||||
//player->karthud[khud_itemblink] = TICRATE;
|
||||
//player->karthud[khud_itemblinkmode] = 1;
|
||||
|
||||
if (P_IsDisplayPlayer(player) && !demo.freecam)
|
||||
{
|
||||
S_StartSound(NULL, sfx_itrole);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
kartitems_t finalItem = roulette->itemList[ roulette->index ];
|
||||
|
||||
K_KartGetItemResult(player, finalItem);
|
||||
|
||||
player->karthud[khud_itemblink] = TICRATE;
|
||||
player->karthud[khud_itemblinkmode] = 0;
|
||||
|
||||
if (P_IsDisplayPlayer(player) && !demo.freecam)
|
||||
{
|
||||
S_StartSound(NULL, sfx_itrolf);
|
||||
}
|
||||
}
|
||||
|
||||
// We're done, disable the roulette
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue