From 78fe4df1ab4ccddad1d6842fe307a667e9afc7d9 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Wed, 8 Aug 2018 12:12:50 +0500 Subject: Disabled collisions for double plants and flowers --- src/World.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/World.cpp b/src/World.cpp index 76598e3..718f54c 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -104,7 +104,7 @@ bool World::isPlayerCollides(double X, double Y, double Z) { for (int y = 0; y < 16; y++) { for (int z = 0; z < 16; z++) { BlockId block = section.GetBlockId(Vector(x, y, z)); - if (block.id == 0 || block.id == 31) + if (block.id == 0 || block.id == 31 || block.id == 37 || block.id == 38 || block.id == 175) continue; AABB blockColl{ (x + it.x * 16.0), (y + it.y * 16.0), @@ -187,7 +187,7 @@ void World::UpdatePhysics(float delta) { for (int z = blockZBegin; z <= blockZEnd; z++) { for (int x = blockXBegin; x <= blockXEnd; x++) { BlockId block = this->GetBlockId(Vector(x, y, z)); - if (block.id == 0 || block.id == 31) + if (block.id == 0 || block.id == 31 || block.id == 37 || block.id == 38 || block.id == 175) continue; AABB blockColl{ x,y,z,1.0,1.0,1.0 }; if (TestCollision(entityCollBox, blockColl)) { -- cgit v1.2.3