mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-06 07:30:35 +07:00
More small bugfixes
This commit is contained in:
parent
b71ef67d54
commit
78faddbf89
@ -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" />
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user