mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Some items have 30 sec cooldown on match start
This commit is contained in:
parent
1bce9d281d
commit
4c3871cb6d
1 changed files with 19 additions and 7 deletions
26
src/k_kart.c
26
src/k_kart.c
|
@ -699,17 +699,19 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed)
|
||||||
if (mashed > 0) \
|
if (mashed > 0) \
|
||||||
odds = FixedDiv(odds<<FRACBITS, FRACUNIT + mashed) >> FRACBITS \
|
odds = FixedDiv(odds<<FRACBITS, FRACUNIT + mashed) >> FRACBITS \
|
||||||
|
|
||||||
|
#define COOLDOWNONSTART (leveltime < (31*TICRATE)+starttime)
|
||||||
|
|
||||||
switch (item)
|
switch (item)
|
||||||
{
|
{
|
||||||
case KITEM_INVINCIBILITY:
|
case KITEM_INVINCIBILITY:
|
||||||
case KITEM_GROW:
|
case KITEM_GROW:
|
||||||
if (pinvin >= max(1, (pingame+2) / 4))
|
if (pinvin >= max(1, (pingame+2) / 4) || COOLDOWNONSTART)
|
||||||
newodds = 0;
|
newodds = 0;
|
||||||
else
|
else
|
||||||
/* FALLTHRU */
|
POWERITEMODDS(newodds);
|
||||||
|
break;
|
||||||
case KITEM_ROCKETSNEAKER:
|
case KITEM_ROCKETSNEAKER:
|
||||||
case KITEM_JAWZ:
|
case KITEM_JAWZ:
|
||||||
case KITEM_MINE:
|
|
||||||
case KITEM_BALLHOG:
|
case KITEM_BALLHOG:
|
||||||
case KITEM_THUNDERSHIELD:
|
case KITEM_THUNDERSHIELD:
|
||||||
case KRITEM_TRIPLESNEAKER:
|
case KRITEM_TRIPLESNEAKER:
|
||||||
|
@ -720,17 +722,27 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed)
|
||||||
case KRITEM_DUALJAWZ:
|
case KRITEM_DUALJAWZ:
|
||||||
POWERITEMODDS(newodds);
|
POWERITEMODDS(newodds);
|
||||||
break;
|
break;
|
||||||
|
case KITEM_MINE:
|
||||||
|
if (COOLDOWNONSTART)
|
||||||
|
newodds = 0;
|
||||||
|
else
|
||||||
|
POWERITEMODDS(newodds);
|
||||||
|
break;
|
||||||
case KITEM_SPB:
|
case KITEM_SPB:
|
||||||
//POWERITEMODDS(newodds);
|
|
||||||
if (((indirectitemcooldown > 0) || (pexiting > 0) || (secondist/distvar < 3))
|
if (((indirectitemcooldown > 0) || (pexiting > 0) || (secondist/distvar < 3))
|
||||||
&& (pos != 9)) // Force SPB
|
&& (pos != 9)) // Force SPB
|
||||||
newodds = 0;
|
newodds = 0;
|
||||||
else
|
else
|
||||||
newodds *= min((secondist/distvar)-4, 3);
|
newodds *= min((secondist/distvar)-4, 3); // POWERITEMODDS(newodds);
|
||||||
break;
|
break;
|
||||||
case KITEM_SHRINK:
|
case KITEM_SHRINK:
|
||||||
POWERITEMODDS(newodds);
|
if ((indirectitemcooldown > 0) || (pingame-1 <= pexiting) || COOLDOWNONSTART)
|
||||||
if ((indirectitemcooldown > 0) || (pingame-1 <= pexiting))
|
newodds = 0;
|
||||||
|
else
|
||||||
|
POWERITEMODDS(newodds);
|
||||||
|
break;
|
||||||
|
case KITEM_HYUDORO:
|
||||||
|
if (COOLDOWNONSTART)
|
||||||
newodds = 0;
|
newodds = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue