Merge branch 'new-items-blah' into new-items

This commit is contained in:
Sally Cochenour 2020-03-22 20:51:16 -04:00
commit 7690eeab2b

View file

@ -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;