mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-18 14:02:51 +00:00
Roulette: don't roll Garden Top if another player already has one
Makes Garden Top odds behave like normal shield odds.
This commit is contained in:
parent
efdcec6734
commit
d2ffa9eeae
1 changed files with 13 additions and 23 deletions
|
|
@ -441,40 +441,30 @@ static UINT32 K_GetItemRouletteDistance(const player_t *player, UINT8 numPlayers
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
static boolean K_DenyShieldOdds(kartitems_t item)
|
static boolean K_DenyShieldOdds(kartitems_t item)
|
||||||
{
|
{
|
||||||
INT32 shieldType = K_GetShieldFromItem(item);
|
const INT32 shieldType = K_GetShieldFromItem(item);
|
||||||
|
size_t i;
|
||||||
|
|
||||||
if ((gametyperules & GTR_CIRCUIT) == 0)
|
if ((gametyperules & GTR_CIRCUIT) == 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (shieldType)
|
if (shieldType == KSHIELD_NONE)
|
||||||
{
|
{
|
||||||
case KSHIELD_NONE:
|
return false;
|
||||||
/* Marble Garden Top is not REALLY
|
}
|
||||||
a Sonic 3 shield */
|
|
||||||
case KSHIELD_TOP:
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (playeringame[i] == false || players[i].spectator == true)
|
||||||
{
|
{
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
if (shieldType == K_GetShieldFromItem(players[i].itemtype))
|
||||||
{
|
{
|
||||||
size_t i;
|
// Don't allow more than one of each shield type at a time
|
||||||
|
return true;
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (playeringame[i] == false || players[i].spectator == true)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shieldType == K_GetShieldFromItem(players[i].itemtype))
|
|
||||||
{
|
|
||||||
// Don't allow more than one of each shield type at a time
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue