From 755ddc2f16f28a493969c22cd3513acddc6e67cd Mon Sep 17 00:00:00 2001 From: fred-boy Date: Mon, 10 Sep 2018 21:14:48 +0700 Subject: [PATCH] Minor fixes --- core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java | 4 ++-- core/src/ru/deadsoftware/cavecraft/game/WorldGen.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java b/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java index 28a8333..a3410c2 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java @@ -29,11 +29,11 @@ public class GamePhysics { switch (dir) { case 0: bl = gameProc.world.getForeMap((int)((rect.x-8)/16),(int)((rect.y+rect.height-8)/16)); - if (checkColl(new Rectangle(rect.x+rect.width/2, rect.y-18, rect.width, rect.height))) bl=0; + if (checkColl(new Rectangle(rect.x-8, rect.y-18, rect.width, rect.height))) bl=0; break; case 1: bl = gameProc.world.getForeMap((int)((rect.x+rect.width+8)/16),(int)((rect.y+rect.height-8)/16)); - if (checkColl(new Rectangle(rect.x+rect.width/2, rect.y-18, rect.width, rect.height))) bl=0; + if (checkColl(new Rectangle(rect.x+rect.width+8, rect.y-18, rect.width, rect.height))) bl=0; break; default: bl=0; diff --git a/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java b/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java index 97b5481..4b4f0e8 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java +++ b/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java @@ -39,6 +39,7 @@ public class WorldGen { bMap[i] = 0; } } + if (res[0]