diff --git a/src/content/loading/EntityLoader.cpp b/src/content/loading/EntityLoader.cpp index 91967ea89..5741b2079 100644 --- a/src/content/loading/EntityLoader.cpp +++ b/src/content/loading/EntityLoader.cpp @@ -87,6 +87,7 @@ template<> void ContentUnitLoader::loadUnit( BodyTypeMeta.getItem(bodyTypeName, def.bodyType); root.at("skeleton-name").get(def.skeletonName); + root.at("material").get(def.material); root.at("blocking").get(def.blocking); root.at("solid").get(def.solid); root.at("mass").get(def.mass); diff --git a/src/objects/EntityDef.hpp b/src/objects/EntityDef.hpp index 195d07a17..6ecb1c917 100644 --- a/src/objects/EntityDef.hpp +++ b/src/objects/EntityDef.hpp @@ -39,6 +39,9 @@ struct EntityDef { /// @brief Skeleton ID std::string skeletonName = name; + /// @brief Solid entity material material + std::string material; + /// @brief Does entity prevent blocks setup bool blocking = true; diff --git a/src/objects/Rigidbody.cpp b/src/objects/Rigidbody.cpp index 2c885f8e0..2426aabac 100644 --- a/src/objects/Rigidbody.cpp +++ b/src/objects/Rigidbody.cpp @@ -87,4 +87,5 @@ void Rigidbody::initialize( create_sensor_callback(entities)}; } hitbox.stepHeight = def.stepHeight; + hitbox.material = def.material; }