From 7eee4d3d8e5e25cf69a39e1bfa3bb9f3bed5da62 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 14 Apr 2016 11:56:58 +0100 Subject: [PATCH] Spawner updates. --- src/battle/script.c | 4 ++-- src/battle/spawners.c | 1 - src/structs.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/battle/script.c b/src/battle/script.c index 2e3d814..d299911 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -218,9 +218,9 @@ static void executeNextLine(ScriptRunner *runner) { activateNextWaypoint(); } - else if (strcmp(command, "ACTIVATE_SPAWNERS") == 0) + else if (strcmp(command, "ACTIVATE_SPAWNER") == 0) { - sscanf(line, "%*s %[^;] %d", strParam[0], &intParam[0]); + sscanf(line, "%*s %d %[^\n]", &intParam[0], strParam[0]); activateSpawner(strParam[0], intParam[0]); } else if (strcmp(command, "MSG_BOX") == 0) diff --git a/src/battle/spawners.c b/src/battle/spawners.c index fda46dd..0c41a3f 100644 --- a/src/battle/spawners.c +++ b/src/battle/spawners.c @@ -116,7 +116,6 @@ void loadSpawners(cJSON *node) s->types = toTypeArray(cJSON_GetObjectItem(node, "types")->valuestring, &s->numTypes); s->side = lookup(cJSON_GetObjectItem(node, "side")->valuestring); s->interval = cJSON_GetObjectItem(node, "interval")->valueint * FPS; - s->limit = getJSONValue(node, "limit", 0); s->total = getJSONValue(node, "total", 0); s->step = cJSON_GetObjectItem(node, "step")->valueint; s->offscreen = getJSONValue(node, "offscreen", 0); diff --git a/src/structs.h b/src/structs.h index f154267..aad74db 100644 --- a/src/structs.h +++ b/src/structs.h @@ -314,7 +314,6 @@ struct Spawner { int side; int time; int interval; - int limit; int total; int step; int offscreen;