mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-01 12:43:33 +00:00
Add limits to PWR unlock condition
This commit is contained in:
parent
81c9a7b928
commit
5a404799b3
1 changed files with 6 additions and 0 deletions
|
|
@ -2360,6 +2360,12 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
|||
re = atoi(params[1]);
|
||||
x1 = atoi(params[2]);
|
||||
|
||||
if (re < PWRLVRECORD_MIN || re > PWRLVRECORD_MAX)
|
||||
{
|
||||
deh_warning("Power level requirement %d out of range (%d - %d) for condition ID %d", re, PWRLVRECORD_MIN, PWRLVRECORD_MAX, id+1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (x1 < 0 || x1 >= PWRLV_NUMTYPES)
|
||||
{
|
||||
deh_warning("Power level type %d out of range (0 - %d) for condition ID %d", x1, PWRLV_NUMTYPES-1, id+1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue