diff -r 8eed495fd8da -r 15f722e0b96f project_files/frontlib/model/team.c --- a/project_files/frontlib/model/team.c Mon Jun 25 15:21:18 2012 +0200 +++ b/project_files/frontlib/model/team.c Wed Jun 27 18:02:45 2012 +0200 @@ -231,6 +231,14 @@ } } +void flib_team_set_health(flib_team *team, int health) { + if(team) { + for(int i=0; ihogs[i].initialHealth = health; + } + } +} + char *strdupWithError(const char *in, bool *error) { char *out = flib_strdupnull(in); if(in && !out) { @@ -239,7 +247,7 @@ return out; } -flib_team *flib_team_copy(flib_team *team) { +flib_team *flib_team_copy(const flib_team *team) { flib_team *result = NULL; if(team) { flib_team *tmpTeam = flib_team_retain(flib_calloc(1, sizeof(flib_team))); @@ -282,7 +290,7 @@ tmpTeam->wins = team->wins; tmpTeam->campaignProgress = team->campaignProgress; - tmpTeam->color = team->color; + tmpTeam->colorIndex = team->colorIndex; tmpTeam->hogsInGame = team->hogsInGame; tmpTeam->remoteDriven = team->remoteDriven;