More small bugfixes
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user