Read the canGrow flag from surface objects

This commit is contained in:
Ted John 2018-12-11 23:00:59 +00:00
parent cf44ea7e24
commit 2da8e18200
2 changed files with 3 additions and 1 deletions

View File

@ -81,7 +81,8 @@ void TerrainSurfaceObject::ReadJson(IReadObjectContext* context, const json_t* r
Flags = ObjectJsonHelpers::GetFlags<TERRAIN_SURFACE_FLAGS>(
properties,
{ { "smoothWithSelf", TERRAIN_SURFACE_FLAGS::SMOOTH_WITH_SELF },
{ "smoothWithOther", TERRAIN_SURFACE_FLAGS::SMOOTH_WITH_OTHER } });
{ "smoothWithOther", TERRAIN_SURFACE_FLAGS::SMOOTH_WITH_OTHER },
{ "canGrow", TERRAIN_SURFACE_FLAGS::CAN_GROW } });
auto jDefault = json_object_get(root, "default");
if (json_is_object(jDefault))

View File

@ -17,6 +17,7 @@ enum TERRAIN_SURFACE_FLAGS
NONE = 0,
SMOOTH_WITH_SELF = 1 << 0,
SMOOTH_WITH_OTHER = 1 << 1,
CAN_GROW = 1 << 2,
};
class TerrainSurfaceObject final : public Object