Allow entities to be created inactive.
This commit is contained in:
parent
4db432f845
commit
197a9fc799
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue