KRF_HIDEFROMSPB

This isn't a thing in v1 and I'm not sure why it was locked to the Thunder Shield for so long
This commit is contained in:
Anonimus 2025-11-12 07:13:40 -05:00
parent ad1b01d97b
commit ef6958a578
3 changed files with 7 additions and 4 deletions

View file

@ -1575,6 +1575,7 @@ struct int_const_s const INT_CONST[] = {
{"KRF_NOTNEAREND",KRF_NOTNEAREND},
{"KRF_NOTFORBOTTOM",KRF_NOTFORBOTTOM},
{"KRF_RUNNERAUGMENT",KRF_RUNNERAUGMENT},
{"KRF_HIDEFROMSPB",KRF_HIDEFROMSPB},
// kartspinoutflags_t
{"KSPIN_THRUST",KSPIN_THRUST},

View file

@ -686,10 +686,6 @@ static INT32 GetItemOdds(kartroulette_t *roulette, kartresult_t *result, UINT8 *
}
}
break;
case KITEM_THUNDERSHIELD:
if (spbplace != -1)
newodds = 0;
break;
default:
break;
}
@ -744,6 +740,11 @@ static INT32 GetItemOdds(kartroulette_t *roulette, kartresult_t *result, UINT8 *
// This item should not appear for losing players. (Usually items that feel less effective at these positions)
newodds = 0;
}
else if (flags & KRF_HIDEFROMSPB && (spbplace != -1))
{
// This item doesn't appear if an SPB is chasing a player.
newodds = 0;
}
else if (flags & KRF_POWERITEM)
{
// This item is a "power item". This activates "frantic item" toggle related functionality.

View file

@ -74,6 +74,7 @@ typedef enum
KRF_NOTNEAREND = 1<<3, // This result should not appear at the end of a race. (Usually trap items that lose their effectiveness)
KRF_NOTFORBOTTOM = 1<<4, // After the first 30 seconds, this result stops appearing for losing players. (Usually items that feel less effective at these positions)
KRF_RUNNERAUGMENT = 1<<5, // This result's odds are affected by the severity of 1st place's frontrun. (Very likely only for SPBs, but who knows?)
KRF_HIDEFROMSPB = 1<<6, // This result refuses to appear when a Self-Propelled Bomb is active in a race or battle.
} ATTRPACK kartresultflags_e;
// Unique useodds function