summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8784890)
raw | patch | inline | side by side (parent: 8784890)
author | fred-boy <fred-boy@protonmail.com> | |
Mon, 10 Sep 2018 14:14:48 +0000 (21:14 +0700) | ||
committer | fred-boy <fred-boy@protonmail.com> | |
Mon, 10 Sep 2018 14:14:48 +0000 (21:14 +0700) |
core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java | patch | blob | history | |
core/src/ru/deadsoftware/cavecraft/game/WorldGen.java | patch | blob | history |
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java b/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java
index 28a8333214fe4983c95f7e3f5ea868f536384910..a3410c2f11dceaf7822684654b0e304a000be025 100644 (file)
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 97b548135591e21502c7aa25cd3f2988fabc0949..4b4f0e8d3772e656b2a5e0d265548ff8badc8df1 100644 (file)
bMap[i] = 0;
}
}
+ if (res[0]<res[width-1]) res[width-1] = res[0];
return res;
}