Kitchen sink is back

Haven't tested yet
This commit is contained in:
SeventhSentinel 2018-06-25 01:36:21 -04:00
parent aa4398f7b9
commit ab64504213
2 changed files with 24 additions and 12 deletions

View file

@ -658,11 +658,9 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, player_t *player, boolean
case KITEM_POGOSPRING: case KITEM_POGOSPRING:
if (!cv_pogospring.value) newodds = 0; if (!cv_pogospring.value) newodds = 0;
break; break;
/*case KITEM_KITCHENSINK: case KITEM_KITCHENSINK:
if (franticitems) newodds *= 2; newodds = 0; // Not obtained via normal means.
if (mashed) newodds /= 2; break;
if (!cv_kitchensink.value) newodds = 0;
break;*/
case KRITEM_TRIPLESNEAKER: case KRITEM_TRIPLESNEAKER:
if (franticitems) newodds *= 2; if (franticitems) newodds *= 2;
if (mashed) newodds /= 2; if (mashed) newodds /= 2;
@ -2297,7 +2295,17 @@ static void K_DoHyudoroSteal(player_t *player)
prandom = P_RandomFixed(); prandom = P_RandomFixed();
S_StartSound(player->mo, sfx_s3k92); S_StartSound(player->mo, sfx_s3k92);
if ((G_RaceGametype() && player->kartstuff[k_position] == 1) || numplayers == 0) // No-one can be stolen from? Get longer invisibility for nothing if (P_RandomChance(FRACUNIT/256)) // BEHOLD THE KITCHEN SINK
{
player->kartstuff[k_hyudorotimer] = hyudorotime;
player->kartstuff[k_stealingtimer] = stealtime;
player->kartstuff[k_itemtype] = KITEM_KITCHENSINK;
player->kartstuff[k_itemamount] = 1;
player->kartstuff[k_itemheld] = 0;
return;
}
else if ((G_RaceGametype() && player->kartstuff[k_position] == 1) || numplayers == 0) // No-one can be stolen from? Oh well...
{ {
player->kartstuff[k_hyudorotimer] = hyudorotime; player->kartstuff[k_hyudorotimer] = hyudorotime;
player->kartstuff[k_stealingtimer] = stealtime; player->kartstuff[k_stealingtimer] = stealtime;
@ -3371,6 +3379,15 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
player->kartstuff[k_itemamount]--; player->kartstuff[k_itemamount]--;
} }
break; break;
case KITEM_KITCHENSINK:
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
{
K_ThrowKartItem(player, false, MT_SINK, 1, true);
K_PlayTauntSound(player->mo);
player->kartstuff[k_itemamount]--;
player->kartstuff[k_itemheld] = 0;
}
break;
case KITEM_SAD: case KITEM_SAD:
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO
&& !player->kartstuff[k_sadtimer]) && !player->kartstuff[k_sadtimer])

View file

@ -2122,12 +2122,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
} }
else if ((target->type == MT_GREENSHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_ORBINAUT) // orbit items else if ((target->type == MT_GREENSHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_ORBINAUT) // orbit items
|| (target->type == MT_JAWZ_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_JAWZ)) || (target->type == MT_JAWZ_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_JAWZ))
{
if (target->lastlook != 0)
target->target->player->kartstuff[k_itemamount] = target->lastlook-1;
else
target->target->player->kartstuff[k_itemamount]--; target->target->player->kartstuff[k_itemamount]--;
}
if (target->target->player->kartstuff[k_itemamount] < 0) if (target->target->player->kartstuff[k_itemamount] < 0)
target->target->player->kartstuff[k_itemamount] = 0; target->target->player->kartstuff[k_itemamount] = 0;