diff --git a/src/content/loading/EntityLoader.cpp b/src/content/loading/EntityLoader.cpp index 625b1927a..fbc29bddf 100644 --- a/src/content/loading/EntityLoader.cpp +++ b/src/content/loading/EntityLoader.cpp @@ -94,6 +94,7 @@ template<> void ContentUnitLoader::loadUnit( root.at("mass").get(def.mass); root.at("elasticity").get(def.elasticity); root.at("step-height").get(def.stepHeight); + root.at("translucent").get(def.translucent); std::string lightingModeName; root.at("lighting-mode").get(lightingModeName); diff --git a/src/objects/EntityDef.cpp b/src/objects/EntityDef.cpp index 54e0aefef..6c3999e98 100644 --- a/src/objects/EntityDef.cpp +++ b/src/objects/EntityDef.cpp @@ -15,4 +15,5 @@ void EntityDef::cloneTo(EntityDef& dst) { dst.stepHeight = stepHeight; dst.save = save; dst.lightingMode = lightingMode; + dst.translucent = translucent; } diff --git a/src/objects/EntityDef.hpp b/src/objects/EntityDef.hpp index 139bce48c..7fc1c113c 100644 --- a/src/objects/EntityDef.hpp +++ b/src/objects/EntityDef.hpp @@ -42,6 +42,9 @@ struct EntityDef { /// @brief Model lighting mode ModelLightingMode lightingMode = ModelLightingMode::SOLID; + /// @brief Render the entity in the translucent pass + bool translucent = true; + /// @brief Can the entity be interacted with cursor (on_attack, on_use) bool selectable = true;