Added death match challenges.
This commit is contained in:
parent
65ef43754e
commit
2e17d68b47
|
@ -95,6 +95,11 @@ Entity *spawnFighter(char *name, int x, int y, int side)
|
|||
|
||||
e->action = doAI;
|
||||
e->die = die;
|
||||
|
||||
if (game.currentMission->challengeData.isDeathMatch)
|
||||
{
|
||||
e->side = SDL_GetTicks();
|
||||
}
|
||||
|
||||
return e;
|
||||
}
|
||||
|
|
|
@ -116,6 +116,8 @@ void loadChallenge(Mission *mission, cJSON *node)
|
|||
mission->challengeData.allowPlayerDeath = getJSONValue(node, "allowPlayerDeath", 0);
|
||||
mission->challengeData.clearWaypointEnemies = getJSONValue(node, "clearWaypointEnemies", 0);
|
||||
mission->challengeData.eliminateThreats = getJSONValue(node, "eliminateThreats", 0);
|
||||
mission->challengeData.isDeathMatch = getJSONValue(node, "isDeathMatch", 0);
|
||||
mission->challengeData.isTeamDeathMatch = getJSONValue(node, "isTeamDeathMatch", 0);
|
||||
|
||||
node = cJSON_GetObjectItem(node, "challenges");
|
||||
|
||||
|
|
|
@ -265,6 +265,8 @@ typedef struct {
|
|||
int allowPlayerDeath;
|
||||
int clearWaypointEnemies;
|
||||
int eliminateThreats;
|
||||
int isDeathMatch;
|
||||
int isTeamDeathMatch;
|
||||
Challenge *challenges[MAX_CHALLENGES];
|
||||
} ChallengeData;
|
||||
|
||||
|
|
Loading…
Reference in New Issue