From 28544af035f25ed01652cd2fe74c3f7c37de3634 Mon Sep 17 00:00:00 2001 From: ZTsukei Date: Sun, 19 Feb 2017 19:41:34 -0500 Subject: [PATCH] Star works, configured to work in multiplayer with just speed items for now... Will return to look for color stuff later. --- src/k_kart.c | 8 +++++--- src/p_user.c | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index d12dd1c5..8ca8c0dc 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -313,9 +313,9 @@ static fixed_t K_KartItemOdds_Retro[MAXPLAYERS][NUMKARTITEMS][MAXPLAYERS] = { //1st // { 0 }, // Magnet { 0 }, // Boo - { 0 }, // Mushroom + { 40 }, // Mushroom { 0 }, // Triple Mushroom - { 40 }, // Mega Mushroom + { 0 }, // Mega Mushroom { 0 }, // Gold Mushroom { 0 }, // Star { 0 }, // Triple Banana @@ -835,6 +835,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (cv_megashroom.value) K_KartSetItemResult(ppos, 5); // Mega Mushroom if (cv_goldshroom.value) K_KartSetItemResult(ppos, 6); // Gold Mushroom if (cv_star.value) K_KartSetItemResult(ppos, 7); // Star + /* if (cv_triplebanana.value) K_KartSetItemResult(ppos, 8); // Triple Banana if (cv_fakeitem.value) K_KartSetItemResult(ppos, 9); // Fake Item if (cv_banana.value) K_KartSetItemResult(ppos, 10); // Banana @@ -846,6 +847,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (cv_fireflower.value) K_KartSetItemResult(ppos, 16); // Fire Flower if (cv_tripleredshell.value) K_KartSetItemResult(ppos, 17); // Triple Red Shell if (cv_lightning.value && pingame > pexiting) K_KartSetItemResult(ppos, 18); // Lightning + */ // Award the player whatever power is rolled if (numchoices > 0) @@ -2089,7 +2091,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground) if (!P_IsLocalPlayer(player)) S_StartSound(player->mo, sfx_star); player->kartstuff[k_startimer] = bonustime; // Activate it - K_PlayTauntSound(player->mo); + //K_PlayTauntSound(player->mo); player->kartstuff[k_star] = 0; player->kartstuff[k_itemclose] = 10; player->pflags |= PF_ATTACKDOWN; diff --git a/src/p_user.c b/src/p_user.c index 67a0d60a..2de3a436 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2176,12 +2176,12 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player) // static void P_CheckInvincibilityTimer(player_t *player) { - if (!player->powers[pw_invulnerability]) + if (!player->powers[pw_invulnerability] && !player->kartstuff[k_startimer]) return; - if (mariomode && !player->powers[pw_super]) + //if (mariomode && !player->powers[pw_super]) // SRB2kart player->mo->color = (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))); - else if (leveltime % (TICRATE/7) == 0) + if (leveltime % (TICRATE/7) == 0) { mobj_t *sparkle = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_IVSP); sparkle->destscale = player->mo->scale; @@ -2189,18 +2189,18 @@ static void P_CheckInvincibilityTimer(player_t *player) } // Resume normal music stuff. - if (player->powers[pw_invulnerability] == 1) + if (player->powers[pw_invulnerability] == 1 || player->kartstuff[k_startimer] == 1) { if (!player->powers[pw_super]) { - if (mariomode) + //if (mariomode) { - if (player->powers[pw_shield] & SH_FIREFLOWER) - { - player->mo->color = SKINCOLOR_WHITE; - G_GhostAddColor(GHC_FIREFLOWER); - } - else + //if (player->powers[pw_shield] & SH_FIREFLOWER) + //{ + // player->mo->color = SKINCOLOR_WHITE; + // G_GhostAddColor(GHC_FIREFLOWER); + //} + //else { player->mo->color = player->skincolor; G_GhostAddColor(GHC_NORMAL);