Fixed fog not clearing, movement bug, items stuck in blocks

This commit is contained in:
Anuken
2018-06-27 11:57:37 -04:00
parent 8b17972b11
commit 5cefecced8
10 changed files with 40 additions and 24 deletions

View File

@@ -279,8 +279,8 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
float px = x, py =y;
if(snap){
x = (int)x;
y = (int)y;
x = (int)(x + 0.0001f);
y = (int)(y + 0.0001f);
}
float ft = Mathf.sin(walktime, 6f, 2f) * (1f-boostHeat);

View File

@@ -52,11 +52,11 @@ public class Units {
boolean[] value = new boolean[1];
Units.getNearby(rect, unit -> {
if(value[0]) return;
if(!unit.isFlying()){
if (value[0]) return;
if (!unit.isFlying()) {
unit.getHitbox(hitrect);
if(hitrect.overlaps(rect)) {
if (hitrect.overlaps(rect)) {
value[0] = true;
}
}

View File

@@ -166,7 +166,11 @@ public class ItemDrop extends SolidEntity implements SaveTrait, SyncTrait, DrawT
Tile tile = world.tileWorld(x, y);
if(tile.floor().isLiquid){
if(tile != null && tile.solid()){
CallEntity.onPickup(getID());
}
if(tile != null && tile.floor().isLiquid){
sinktime += Timers.delta();
if(Mathf.chance(0.04 * Timers.delta())){