From: Holger Schemel Date: Tue, 22 Jun 2021 07:59:59 +0000 (+0200) Subject: added level name/author and "rate time over score" flag when adding score X-Git-Tag: 4.3.0.0~122 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f1aebde75ba585d30f7fd9172cad2fb65c14f645;p=rocksndiamonds.git added level name/author and "rate time over score" flag when adding score --- diff --git a/src/files.c b/src/files.c index bb3832bd..93d38e7c 100644 --- a/src/files.c +++ b/src/files.c @@ -9276,6 +9276,8 @@ static void UploadScoreToServerExt(struct HttpRequest *request, char *levelset_identifier = getEscapedJSON(leveldir_current->identifier); char *levelset_name = getEscapedJSON(leveldir_current->name); char *levelset_author = getEscapedJSON(leveldir_current->author); + char *level_name = getEscapedJSON(level.name); + char *level_author = getEscapedJSON(level.author); char *player_name = getEscapedJSON(score_entry->name); snprintf(request->body, MAX_HTTP_BODY_SIZE, @@ -9287,6 +9289,9 @@ static void UploadScoreToServerExt(struct HttpRequest *request, " \"levelset_num_levels\": \"%d\",\n" " \"levelset_first_level\": \"%d\",\n" " \"level_nr\": \"%d\",\n" + " \"level_name\": \"%s\",\n" + " \"level_author\": \"%s\",\n" + " \"rate_time_over_score\": \"%d\",\n" " \"player_name\": \"%s\",\n" " \"score\": \"%d\",\n" " \"time\": \"%d\",\n" @@ -9300,6 +9305,9 @@ static void UploadScoreToServerExt(struct HttpRequest *request, leveldir_current->levels, leveldir_current->first_level, level_nr, + level_name, + level_author, + level.rate_time_over_score, player_name, score_entry->score, score_entry->time, @@ -9311,6 +9319,8 @@ static void UploadScoreToServerExt(struct HttpRequest *request, checked_free(levelset_identifier); checked_free(levelset_name); checked_free(levelset_author); + checked_free(level_name); + checked_free(level_author); checked_free(player_name); ConvertHttpRequestBodyToServerEncoding(request);