mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed block snapping ground clip
This commit is contained in:
parent
9bc2a99557
commit
2171e77fe5
@ -302,6 +302,13 @@ impl<'a> System<'a> for Sys {
|
|||||||
) && vel.0.z < 0.0
|
) && vel.0.z < 0.0
|
||||||
&& vel.0.z > -1.5
|
&& vel.0.z > -1.5
|
||||||
&& was_on_ground
|
&& was_on_ground
|
||||||
|
&& !terrain
|
||||||
|
.get(
|
||||||
|
Vec3::new(pos.0.x, pos.0.y, (pos.0.z - 0.05).floor())
|
||||||
|
.map(|e| e.floor() as i32),
|
||||||
|
)
|
||||||
|
.map(|vox| vox.is_solid())
|
||||||
|
.unwrap_or(false)
|
||||||
{
|
{
|
||||||
pos.0.z = (pos.0.z - 0.05).floor();
|
pos.0.z = (pos.0.z - 0.05).floor();
|
||||||
physics_state.on_ground = true;
|
physics_state.on_ground = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user