More small bugfixes
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="io.anuke.mindustry"
|
package="io.anuke.mindustry"
|
||||||
android:versionCode="65"
|
android:versionCode="66"
|
||||||
android:versionName="3.3b15.1" >
|
android:versionName="3.3b15.2" >
|
||||||
|
|
||||||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||||
<uses-permission android:name="com.android.vending.BILLING" />
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
|
|||||||
@@ -175,8 +175,8 @@ public class NetServer extends Module{
|
|||||||
if(group.getByID(id) != null){
|
if(group.getByID(id) != null){
|
||||||
EntitySpawnPacket p = new EntitySpawnPacket();
|
EntitySpawnPacket p = new EntitySpawnPacket();
|
||||||
p.entity = (SyncEntity)group.getByID(id);
|
p.entity = (SyncEntity)group.getByID(id);
|
||||||
|
p.group = group;
|
||||||
Net.sendTo(dest, p, SendMode.tcp);
|
Net.sendTo(dest, p, SendMode.tcp);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public class Player extends SyncEntity{
|
|||||||
|
|
||||||
public float angle;
|
public float angle;
|
||||||
public float targetAngle = 0f;
|
public float targetAngle = 0f;
|
||||||
|
public float stucktime = 0f;
|
||||||
public boolean dashing = false;
|
public boolean dashing = false;
|
||||||
|
|
||||||
public int clientid;
|
public int clientid;
|
||||||
@@ -145,6 +146,12 @@ public class Player extends SyncEntity{
|
|||||||
|
|
||||||
//if player is in solid block
|
//if player is in solid block
|
||||||
if(tile != null && ((tile.floor().liquid && tile.block() == Blocks.air) || tile.solid())){
|
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
|
damage(health+1); //die instantly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ public class EnemyType {
|
|||||||
|
|
||||||
Tile core = world.getCore();
|
Tile core = world.getCore();
|
||||||
|
|
||||||
if(enemy.idletime > maxIdleLife){
|
if(enemy.idletime > maxIdleLife && enemy.node >= 0){
|
||||||
enemy.onDeath();
|
enemy.onDeath();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class BlastType extends EnemyType {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDeath(Enemy enemy, boolean force){
|
public void onDeath(Enemy enemy, boolean force){
|
||||||
if(!enemy.isDead()) explode(enemy);
|
if(force) explode(enemy);
|
||||||
super.onDeath(enemy, force);
|
super.onDeath(enemy, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ public class Packets {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(ByteBuffer buffer){
|
public void write(ByteBuffer buffer){
|
||||||
buffer.put((byte)entity.getGroup().getID());
|
buffer.put((byte)group.getID());
|
||||||
buffer.putInt(entity.id);
|
buffer.putInt(entity.id);
|
||||||
entity.writeSpawn(buffer);
|
entity.writeSpawn(buffer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class DebugFragment implements Fragment {
|
|||||||
netClient.clearRecieved();
|
netClient.clearRecieved();
|
||||||
});
|
});
|
||||||
row();
|
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();
|
row();
|
||||||
new button("stuff", () -> netClient.test());
|
new button("stuff", () -> netClient.test());
|
||||||
row();
|
row();
|
||||||
|
|||||||
Reference in New Issue
Block a user