From 009bb74a958e1261bd6cb3bf88885880f6e978a5 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 7 Mar 2018 07:49:24 +0000 Subject: [PATCH] Save type of destructable and exit. --- src/entities/misc/destructable.c | 1 + src/entities/structures/exit.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/entities/misc/destructable.c b/src/entities/misc/destructable.c index 0159a7e..ea1fa91 100644 --- a/src/entities/misc/destructable.c +++ b/src/entities/misc/destructable.c @@ -135,6 +135,7 @@ static void save(cJSON *root) s = (Structure*)self; + cJSON_AddStringToObject(root, "type", "Destructable"); cJSON_AddNumberToObject(root, "health", s->health); cJSON_AddNumberToObject(root, "healthMax", s->healthMax); cJSON_AddStringToObject(root, "spriteName", s->spriteName); diff --git a/src/entities/structures/exit.c b/src/entities/structures/exit.c index edcf744..53fde2c 100644 --- a/src/entities/structures/exit.c +++ b/src/entities/structures/exit.c @@ -162,5 +162,6 @@ static void save(cJSON *root) s = (Structure*)self; + cJSON_AddStringToObject(root, "type", "Exit"); cJSON_AddNumberToObject(root, "active", s->active); }