Allow entities to be created inactive.

This commit is contained in:
Steve 2015-11-20 22:52:17 +00:00
parent 4db432f845
commit 197a9fc799
1 changed files with 5 additions and 0 deletions

View File

@ -370,6 +370,11 @@ static void loadEntities(cJSON *node)
e->x = cJSON_GetObjectItem(node, "x")->valuedouble * GRID_CELL_WIDTH;
e->y = cJSON_GetObjectItem(node, "y")->valuedouble * GRID_CELL_HEIGHT;
if (cJSON_GetObjectItem(node, "active"))
{
e->active = cJSON_GetObjectItem(node, "active")->valueint;
}
if (cJSON_GetObjectItem(node, "flags"))
{
e->flags = flagsToLong(cJSON_GetObjectItem(node, "flags")->valuestring);