From 946afe4a0268ed8e29243eb1fbd5605672419492 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 20 May 2016 10:54:09 +0100 Subject: [PATCH] Removed INTERVAL script checking - unused. --- src/battle/script.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/battle/script.c b/src/battle/script.c index b6a049b..e8be758 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -141,7 +141,6 @@ void runScriptTimeFunctions(void) cJSON *function; char *functionName; char funcNameBuffer[MAX_NAME_LENGTH]; - int intParam; if (scriptJSON && runScript) { @@ -166,24 +165,6 @@ void runScriptTimeFunctions(void) SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Running script '%s'", funcNameBuffer); } - if (strstr(functionName, "INTERVAL")) - { - sscanf(functionName, "%*s %d", &intParam); - - if ((battle.stats[STAT_TIME] / 60) % intParam == 0) - { - scriptRunner = malloc(sizeof(ScriptRunner)); - memset(scriptRunner, 0, sizeof(ScriptRunner)); - - scriptRunner->line = cJSON_GetObjectItem(function, "lines")->child; - - tail->next = scriptRunner; - tail = scriptRunner; - - SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Running script '%s'", funcNameBuffer); - } - } - function = function->next; } }