mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
add 'grounded' support for 'pipe' rotation profile
This commit is contained in:
parent
359123bb36
commit
4c8ae465c7
4 changed files with 21 additions and 5 deletions
|
|
@ -202,4 +202,13 @@ public:
|
|||
Block(const Block&) = delete;
|
||||
};
|
||||
|
||||
inline glm::ivec3 get_ground_direction(const Block* def, int rotation) {
|
||||
const auto& profileName = def->rotations.name;
|
||||
if (profileName == BlockRotProfile::PIPE_NAME) {
|
||||
return -def->rotations.variants[rotation].axisY;
|
||||
} else {
|
||||
return glm::ivec3(0, -1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // VOXELS_BLOCK_HPP_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue