Added disable limit to challenges.

This commit is contained in:
Steve 2016-05-10 09:59:06 +01:00
parent a335b738a7
commit 3537265e6a
2 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,8 @@ void loadChallenge(Mission *mission, cJSON *node)
int i; int i;
Challenge *challenge; Challenge *challenge;
memset(&mission->challengeData, 0, sizeof(ChallengeData));
mission->challengeData.isChallenge = 1; mission->challengeData.isChallenge = 1;
/* limits */ /* limits */
@ -99,6 +101,7 @@ void loadChallenge(Mission *mission, cJSON *node)
mission->challengeData.itemLimit = getJSONValue(node, "itemLimit", 0); mission->challengeData.itemLimit = getJSONValue(node, "itemLimit", 0);
mission->challengeData.playerItemLimit = getJSONValue(node, "playerItemLimit", 0); mission->challengeData.playerItemLimit = getJSONValue(node, "playerItemLimit", 0);
mission->challengeData.rescueLimit = getJSONValue(node, "rescueLimit", 0); mission->challengeData.rescueLimit = getJSONValue(node, "rescueLimit", 0);
mission->challengeData.disableLimit = getJSONValue(node, "disableLimit", 0);
/* restrictions */ /* restrictions */
mission->challengeData.noMissiles = getJSONValue(node, "noMissiles", 0); mission->challengeData.noMissiles = getJSONValue(node, "noMissiles", 0);

View File

@ -257,6 +257,7 @@ typedef struct {
int escapeLimit; int escapeLimit;
int waypointLimit; int waypointLimit;
int rescueLimit; int rescueLimit;
int disableLimit;
int noMissiles; int noMissiles;
int noBoost; int noBoost;
int noECM; int noECM;