mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-10 10:02:41 +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);
|
PARAMCHECK(1);
|
||||||
ty = UCRP_PODIUMCUP;
|
ty = UCRP_PODIUMCUP;
|
||||||
|
|
||||||
|
re = -1;
|
||||||
|
if (!fastcmp(params[1], "ANY"))
|
||||||
{
|
{
|
||||||
cupheader_t *cup = kartcupheaders;
|
cupheader_t *cup = kartcupheaders;
|
||||||
UINT32 hash = quickncasehash(params[1], MAXCUPNAME);
|
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)
|
if (grandprixinfo.gp == false || K_PodiumRanking() == false)
|
||||||
return false;
|
return false;
|
||||||
if (grandprixinfo.cup == NULL
|
if (grandprixinfo.cup == NULL
|
||||||
|| grandprixinfo.cup->id != cn->requirement)
|
|| (
|
||||||
|
cn->requirement != -1 // Any
|
||||||
|
&& grandprixinfo.cup->id != cn->requirement
|
||||||
|
)
|
||||||
|
)
|
||||||
return false;
|
return false;
|
||||||
if (cn->extrainfo2)
|
if (cn->extrainfo2 != 0)
|
||||||
return (K_PodiumGrade() >= (unsigned)cn->requirement);
|
return (K_PodiumGrade() >= (unsigned)cn->requirement);
|
||||||
if (cn->extrainfo1 != 0)
|
if (cn->extrainfo1 != 0)
|
||||||
return (player->position != 0
|
return (player->position != 0
|
||||||
|
|
@ -2373,6 +2377,13 @@ static const char *M_GetConditionString(condition_t *cn)
|
||||||
orbetter = " or better in";
|
orbetter = " or better in";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cn->requirement == -1)
|
||||||
|
{
|
||||||
|
return va("%s%s any Cup",
|
||||||
|
completetype, orbetter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
for (cup = kartcupheaders; cup; cup = cup->next)
|
for (cup = kartcupheaders; cup; cup = cup->next)
|
||||||
{
|
{
|
||||||
if (cup->id != cn->requirement)
|
if (cup->id != cn->requirement)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue