mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 17:51:27 +00:00
Kitchen sink is back
Haven't tested yet
This commit is contained in:
parent
aa4398f7b9
commit
ab64504213
2 changed files with 24 additions and 12 deletions
29
src/k_kart.c
29
src/k_kart.c
|
@ -658,11 +658,9 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, player_t *player, boolean
|
|||
case KITEM_POGOSPRING:
|
||||
if (!cv_pogospring.value) newodds = 0;
|
||||
break;
|
||||
/*case KITEM_KITCHENSINK:
|
||||
if (franticitems) newodds *= 2;
|
||||
if (mashed) newodds /= 2;
|
||||
if (!cv_kitchensink.value) newodds = 0;
|
||||
break;*/
|
||||
case KITEM_KITCHENSINK:
|
||||
newodds = 0; // Not obtained via normal means.
|
||||
break;
|
||||
case KRITEM_TRIPLESNEAKER:
|
||||
if (franticitems) newodds *= 2;
|
||||
if (mashed) newodds /= 2;
|
||||
|
@ -2297,7 +2295,17 @@ static void K_DoHyudoroSteal(player_t *player)
|
|||
prandom = P_RandomFixed();
|
||||
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_stealingtimer] = stealtime;
|
||||
|
@ -3371,6 +3379,15 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
player->kartstuff[k_itemamount]--;
|
||||
}
|
||||
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:
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO
|
||||
&& !player->kartstuff[k_sadtimer])
|
||||
|
|
|
@ -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
|
||||
|| (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)
|
||||
target->target->player->kartstuff[k_itemamount] = 0;
|
||||
|
|
Loading…
Reference in a new issue