add 'translucent' entity property

This commit is contained in:
MihailRis 2026-10-16 12:24:17 +03:00
parent 35e3d80f35
commit 1ec159d2f6
3 changed files with 5 additions and 0 deletions

View file

@ -94,6 +94,7 @@ template<> void ContentUnitLoader<EntityDef>::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);

View file

@ -15,4 +15,5 @@ void EntityDef::cloneTo(EntityDef& dst) {
dst.stepHeight = stepHeight;
dst.save = save;
dst.lightingMode = lightingMode;
dst.translucent = translucent;
}

View file

@ -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;