mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-07 16:42:45 +00:00
Add support for PodiumCup Any
This commit is contained in:
parent
f68d58fb85
commit
48bb2e1b3c
2 changed files with 16 additions and 2 deletions
|
|
@ -2881,6 +2881,9 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
|
|||
{
|
||||
PARAMCHECK(1);
|
||||
ty = UCRP_PODIUMCUP;
|
||||
|
||||
re = -1;
|
||||
if (!fastcmp(params[1], "ANY"))
|
||||
{
|
||||
cupheader_t *cup = kartcupheaders;
|
||||
UINT32 hash = quickncasehash(params[1], MAXCUPNAME);
|
||||
|
|
|
|||
15
src/m_cond.c
15
src/m_cond.c
|
|
@ -1499,9 +1499,13 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
|||
if (grandprixinfo.gp == false || K_PodiumRanking() == false)
|
||||
return false;
|
||||
if (grandprixinfo.cup == NULL
|
||||
|| grandprixinfo.cup->id != cn->requirement)
|
||||
|| (
|
||||
cn->requirement != -1 // Any
|
||||
&& grandprixinfo.cup->id != cn->requirement
|
||||
)
|
||||
)
|
||||
return false;
|
||||
if (cn->extrainfo2)
|
||||
if (cn->extrainfo2 != 0)
|
||||
return (K_PodiumGrade() >= (unsigned)cn->requirement);
|
||||
if (cn->extrainfo1 != 0)
|
||||
return (player->position != 0
|
||||
|
|
@ -2373,6 +2377,13 @@ static const char *M_GetConditionString(condition_t *cn)
|
|||
orbetter = " or better in";
|
||||
}
|
||||
|
||||
if (cn->requirement == -1)
|
||||
{
|
||||
return va("%s%s any Cup",
|
||||
completetype, orbetter
|
||||
);
|
||||
}
|
||||
|
||||
for (cup = kartcupheaders; cup; cup = cup->next)
|
||||
{
|
||||
if (cup->id != cn->requirement)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue