mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
fix extended block grounding (new block property)
This commit is contained in:
parent
0cc8c70a17
commit
0b7dc14f55
7 changed files with 111 additions and 8 deletions
|
|
@ -140,6 +140,22 @@ VC_ENUM_METADATA(CullingMode)
|
|||
{"disabled", CullingMode::DISABLED},
|
||||
VC_ENUM_END
|
||||
|
||||
/// @brief Grounding behaviour for extended blocks
|
||||
enum class GroundingBehaviour : uint8_t {
|
||||
/// @brief at least one segment must be grounded
|
||||
PARTIAL,
|
||||
/// @brief all segments must be grounded
|
||||
COMPLETE,
|
||||
/// @brief origin segment must be grounded
|
||||
ORIGIN
|
||||
};
|
||||
|
||||
VC_ENUM_METADATA(GroundingBehaviour)
|
||||
{"partial", GroundingBehaviour::PARTIAL},
|
||||
{"complete", GroundingBehaviour::COMPLETE},
|
||||
{"origin", GroundingBehaviour::ORIGIN},
|
||||
VC_ENUM_END
|
||||
|
||||
/// @brief Common kit of block properties applied to groups of blocks
|
||||
struct BlockMaterial : Serializable {
|
||||
std::string name;
|
||||
|
|
@ -239,6 +255,9 @@ public:
|
|||
/// @brief Explicitly overriding 'solid' property if true assigned
|
||||
bool explictlySolid = false;
|
||||
|
||||
/// @brief Grounding behaviour
|
||||
GroundingBehaviour groundingBehaviour = GroundingBehaviour::PARTIAL;
|
||||
|
||||
/// @brief Set of block physical hitboxes
|
||||
std::vector<AABB> hitboxes {AABB()};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue