mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-24 08:52:33 +00:00
K_KartGetItemOdds: apply GTR_CIRCUIT checks
- No restriction on whether more than one player may receive the same type of shield outside of Race. - SPB is now technically allowed outside of Race, if item odds permit. - powerItems and assorted checks no longer apply outside of Race.
This commit is contained in:
parent
a37eccd708
commit
339cb1e8b8
1 changed files with 16 additions and 9 deletions
|
|
@ -434,6 +434,11 @@ static boolean K_DenyShieldOdds(kartitems_t item)
|
|||
{
|
||||
INT32 shieldType = K_GetShieldFromItem(item);
|
||||
|
||||
if ((gametyperules & GTR_CIRCUIT) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (shieldType)
|
||||
{
|
||||
case KSHIELD_NONE:
|
||||
|
|
@ -535,6 +540,12 @@ typedef struct {
|
|||
--------------------------------------------------*/
|
||||
static fixed_t K_AdjustItemOddsToConditions(fixed_t newOdds, const itemconditions_t *conditions, const itemroulette_t *roulette)
|
||||
{
|
||||
// None if this applies outside of Race modes (for now?)
|
||||
if ((gametyperules & GTR_CIRCUIT) == 0)
|
||||
{
|
||||
return newOdds;
|
||||
}
|
||||
|
||||
if ((conditions->cooldownOnStart == true) && (leveltime < (30*TICRATE) + starttime))
|
||||
{
|
||||
// This item should not appear at the beginning of a race. (Usually really powerful crowd-breaking items)
|
||||
|
|
@ -697,13 +708,8 @@ INT32 K_KartGetItemOdds(const player_t *player, itemroulette_t *const roulette,
|
|||
conditions.cooldownOnStart = true;
|
||||
conditions.notNearEnd = true;
|
||||
|
||||
if ((gametyperules & GTR_CIRCUIT) == 0)
|
||||
{
|
||||
// Needs to be a race.
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (specialstageinfo.valid == false)
|
||||
if ((gametyperules & GTR_CIRCUIT) &&
|
||||
specialstageinfo.valid == false)
|
||||
{
|
||||
newOdds = K_AdjustSPBOdds(roulette, position);
|
||||
}
|
||||
|
|
@ -716,7 +722,8 @@ INT32 K_KartGetItemOdds(const player_t *player, itemroulette_t *const roulette,
|
|||
conditions.powerItem = true;
|
||||
conditions.notNearEnd = true;
|
||||
|
||||
if (roulette->playing - 1 <= roulette->exiting)
|
||||
if ((gametyperules & GTR_CIRCUIT) &&
|
||||
roulette->playing - 1 <= roulette->exiting)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -728,7 +735,7 @@ INT32 K_KartGetItemOdds(const player_t *player, itemroulette_t *const roulette,
|
|||
conditions.cooldownOnStart = true;
|
||||
conditions.powerItem = true;
|
||||
|
||||
if (spbplace != -1)
|
||||
if ((gametyperules & GTR_CIRCUIT) && spbplace != -1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue