Assume objects with no type field are not clones
This commit is contained in:
parent
fc11e3d60b
commit
b20df82358
1 changed files with 1 additions and 1 deletions
|
@ -218,7 +218,7 @@ bool Project::loadMapData(Map* map) {
|
||||||
QJsonObject event = objectEventsArr[i].toObject();
|
QJsonObject event = objectEventsArr[i].toObject();
|
||||||
// If clone objects are not enabled then no type field is present
|
// If clone objects are not enabled then no type field is present
|
||||||
QString type = hasCloneObjects ? event["type"].toString() : "object";
|
QString type = hasCloneObjects ? event["type"].toString() : "object";
|
||||||
if (type == "object") {
|
if (type.isEmpty() || type == "object") {
|
||||||
Event *object = new Event(event, EventType::Object);
|
Event *object = new Event(event, EventType::Object);
|
||||||
object->put("map_name", map->name);
|
object->put("map_name", map->name);
|
||||||
object->put("sprite", event["graphics_id"].toString());
|
object->put("sprite", event["graphics_id"].toString());
|
||||||
|
|
Loading…
Reference in a new issue