More small bugfixes

This commit is contained in:
Anuken
2018-01-31 19:38:20 -05:00
parent b71ef67d54
commit 78faddbf89
7 changed files with 14 additions and 7 deletions

View File

@@ -34,6 +34,7 @@ public class Player extends SyncEntity{
public float angle;
public float targetAngle = 0f;
public float stucktime = 0f;
public boolean dashing = false;
public int clientid;
@@ -145,6 +146,12 @@ public class Player extends SyncEntity{
//if player is in solid block
if(tile != null && ((tile.floor().liquid && tile.block() == Blocks.air) || tile.solid())){
stucktime += Timers.delta();
}else{
stucktime = 0f;
}
if(stucktime > 10f){
damage(health+1); //die instantly
}

View File

@@ -149,7 +149,7 @@ public class EnemyType {
Tile core = world.getCore();
if(enemy.idletime > maxIdleLife){
if(enemy.idletime > maxIdleLife && enemy.node >= 0){
enemy.onDeath();
return;
}

View File

@@ -41,7 +41,7 @@ public class BlastType extends EnemyType {
@Override
public void onDeath(Enemy enemy, boolean force){
if(!enemy.isDead()) explode(enemy);
if(force) explode(enemy);
super.onDeath(enemy, force);
}