Removed INTERVAL script checking - unused.

This commit is contained in:
Steve 2016-05-20 10:54:09 +01:00
parent 5e282b46f7
commit 946afe4a02
1 changed files with 0 additions and 19 deletions

View File

@ -141,7 +141,6 @@ void runScriptTimeFunctions(void)
cJSON *function; cJSON *function;
char *functionName; char *functionName;
char funcNameBuffer[MAX_NAME_LENGTH]; char funcNameBuffer[MAX_NAME_LENGTH];
int intParam;
if (scriptJSON && runScript) if (scriptJSON && runScript)
{ {
@ -166,24 +165,6 @@ void runScriptTimeFunctions(void)
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Running script '%s'", funcNameBuffer); 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; function = function->next;
} }
} }