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

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.anuke.mindustry"
android:versionCode="65"
android:versionName="3.3b15.1" >
android:versionCode="66"
android:versionName="3.3b15.2" >
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="com.android.vending.BILLING" />

View File

@ -175,8 +175,8 @@ public class NetServer extends Module{
if(group.getByID(id) != null){
EntitySpawnPacket p = new EntitySpawnPacket();
p.entity = (SyncEntity)group.getByID(id);
p.group = group;
Net.sendTo(dest, p, SendMode.tcp);
return;
}
});

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);
}

View File

@ -254,7 +254,7 @@ public class Packets {
@Override
public void write(ByteBuffer buffer){
buffer.put((byte)entity.getGroup().getID());
buffer.put((byte)group.getID());
buffer.putInt(entity.id);
entity.writeSpawn(buffer);
}

View File

@ -55,7 +55,7 @@ public class DebugFragment implements Fragment {
netClient.clearRecieved();
});
row();
new button("spawn", () -> new Enemy(EnemyTypes.standard).set(player.x, player.y).add());
new button("spawn", () -> new Enemy(EnemyTypes.blast).set(player.x, player.y).add());
row();
new button("stuff", () -> netClient.test());
row();