elevation is gone but this time I'm not doing the crab rave meme

This commit is contained in:
Anuken
2019-01-10 21:45:18 -05:00
parent 84e754dd10
commit ae3aa20508
28 changed files with 182 additions and 655 deletions
@@ -249,11 +249,6 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
if(tile.block() != Blocks.air){
onLiquid = false;
}
//on slope
if(tile.getElevation() == -1){
velocity.scl(0.7f);
}
}
if(onLiquid && velocity.len() > 0.4f && Mathf.chance((velocity.len() * floor.speedMultiplier) * 0.06f * Time.delta())){
@@ -183,7 +183,7 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai
float deposited = Math.min((amount - maxLiquid / 1.5f) / 4f, 0.3f) * Time.delta();
for(Point2 point : Geometry.d4){
Tile other = world.tile(tile.x + point.x, tile.y + point.y);
if(other != null && other.block() == Blocks.air && !other.hasCliffs()){
if(other != null && other.block() == Blocks.air){
deposit(other, tile, liquid, deposited, generation + 1);
amount -= deposited / 2f; //tweak to speed up/slow down puddle propagation
}