mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Merge branch 'new-items-blah' into new-items
This commit is contained in:
commit
7690eeab2b
1 changed files with 16 additions and 5 deletions
21
src/k_kart.c
21
src/k_kart.c
|
|
@ -919,14 +919,25 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed, boolean sp
|
||||||
POWERITEMODDS(newodds);
|
POWERITEMODDS(newodds);
|
||||||
break;
|
break;
|
||||||
case KITEM_SPB:
|
case KITEM_SPB:
|
||||||
if ((indirectitemcooldown > 0) || (secondist/DISTVAR < 3)
|
if ((indirectitemcooldown > 0) || COOLDOWNONSTART
|
||||||
|| (first != -1 && players[first].distancetofinish > 8*DISTVAR)) // No SPB near the end of the race
|
|| (first != -1 && players[first].distancetofinish < 8*DISTVAR)) // No SPB near the end of the race
|
||||||
|
{
|
||||||
newodds = 0;
|
newodds = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
newodds *= min((secondist/DISTVAR)-4, 3); // POWERITEMODDS(newodds);
|
{
|
||||||
|
INT32 multiplier = (secondist - (4*DISTVAR)) / DISTVAR;
|
||||||
|
|
||||||
|
if (multiplier < 0)
|
||||||
|
multiplier = 0;
|
||||||
|
if (multiplier > 3)
|
||||||
|
multiplier = 3;
|
||||||
|
|
||||||
|
newodds *= multiplier;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case KITEM_SHRINK:
|
case KITEM_SHRINK:
|
||||||
if ((indirectitemcooldown > 0) || (pingame-1 <= pexiting) || COOLDOWNONSTART)
|
if ((indirectitemcooldown > 0) || COOLDOWNONSTART || (pingame-1 <= pexiting))
|
||||||
newodds = 0;
|
newodds = 0;
|
||||||
else
|
else
|
||||||
POWERITEMODDS(newodds);
|
POWERITEMODDS(newodds);
|
||||||
|
|
@ -1124,7 +1135,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mapobjectscale != FRACUNIT)
|
if (mapobjectscale != FRACUNIT)
|
||||||
pdis = FixedDiv(pdis, mapobjectscale);
|
pdis = FixedDiv(pdis * FRACUNIT, mapobjectscale);
|
||||||
|
|
||||||
if (franticitems) // Frantic items make the distances between everyone artifically higher, for crazier items
|
if (franticitems) // Frantic items make the distances between everyone artifically higher, for crazier items
|
||||||
pdis = (15 * pdis) / 14;
|
pdis = (15 * pdis) / 14;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue