mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +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
|
|
@ -22,6 +22,7 @@
|
|||
#include "scripting/scripting.hpp"
|
||||
#include "settings.hpp"
|
||||
#include "voxels/Block.hpp"
|
||||
#include "voxels/blocks_agent.hpp"
|
||||
#include "voxels/Chunks.hpp"
|
||||
#include "voxels/voxel.hpp"
|
||||
#include "window/Camera.hpp"
|
||||
|
|
@ -448,10 +449,7 @@ void PlayerController::processRightClick(
|
|||
return;
|
||||
}
|
||||
if (def.grounded) {
|
||||
const auto& vec = get_ground_direction(def, state.rotation);
|
||||
if (!chunks.isSolidBlock(
|
||||
coord.x + vec.x, coord.y + vec.y, coord.z + vec.z
|
||||
)) {
|
||||
if (!blocks_agent::check_grounding(chunks, def, state.rotation, coord)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue