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
|
Run this macro, then #undef FOREACH afterward
|
||||||
*/
|
*/
|
||||||
#define KART_ITEM_ITERATOR \
|
#define KART_ITEM_ITERATOR \
|
||||||
FOREACH (EGGEXPLODE, -2),\
|
|
||||||
FOREACH (SAD, -1),\
|
FOREACH (SAD, -1),\
|
||||||
FOREACH (NONE, 0),\
|
FOREACH (NONE, 0),\
|
||||||
FOREACH (SNEAKER, 1),\
|
FOREACH (SNEAKER, 1),\
|
||||||
|
|
|
||||||
|
|
@ -738,6 +738,7 @@ static void K_InitRoulette(itemroulette_t *const roulette)
|
||||||
roulette->elapsed = 0;
|
roulette->elapsed = 0;
|
||||||
roulette->tics = roulette->speed = 3; // Some default speed
|
roulette->tics = roulette->speed = 3; // Some default speed
|
||||||
roulette->active = true;
|
roulette->active = true;
|
||||||
|
roulette->eggman = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_PushToRouletteItemList(itemroulette_t *const roulette, kartitems_t item)
|
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)
|
void K_StartEggmanRoulette(player_t *const player)
|
||||||
{
|
{
|
||||||
itemroulette_t *const roulette = &player->itemRoulette;
|
itemroulette_t *const roulette = &player->itemRoulette;
|
||||||
|
K_StartItemRoulette(player, roulette);
|
||||||
K_InitRoulette(roulette);
|
|
||||||
K_PushToRouletteItemList(roulette, KITEM_EGGEXPLODE);
|
|
||||||
roulette->eggman = true;
|
roulette->eggman = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -963,16 +962,34 @@ void K_KartItemRoulette(player_t *const player, ticcmd_t *const cmd)
|
||||||
// I'm returning via the exact opposite, however, to forgo having another bracket embed. Same result either way, I think.
|
// I'm returning via the exact opposite, however, to forgo having another bracket embed. Same result either way, I think.
|
||||||
// Finally, if you get past this check, now you can actually start calculating what item you get.
|
// 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)
|
if (confirmItem == true && (player->pflags & (PF_ITEMOUT|PF_EGGMANOUT|PF_USERINGS)) == 0)
|
||||||
|
{
|
||||||
|
if (roulette->eggman == true)
|
||||||
|
{
|
||||||
|
// 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 ];
|
kartitems_t finalItem = roulette->itemList[ roulette->index ];
|
||||||
|
|
||||||
K_KartGetItemResult(player, finalItem);
|
K_KartGetItemResult(player, finalItem);
|
||||||
|
|
||||||
player->karthud[khud_itemblink] = TICRATE;
|
player->karthud[khud_itemblink] = TICRATE;
|
||||||
|
player->karthud[khud_itemblinkmode] = 0;
|
||||||
|
|
||||||
if (P_IsDisplayPlayer(player) && !demo.freecam)
|
if (P_IsDisplayPlayer(player) && !demo.freecam)
|
||||||
{
|
{
|
||||||
S_StartSound(NULL, sfx_itrolf);
|
S_StartSound(NULL, sfx_itrolf);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// We're done, disable the roulette
|
// We're done, disable the roulette
|
||||||
roulette->active = false;
|
roulette->active = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue