Bugfixes
This commit is contained in:
@@ -145,7 +145,7 @@ public class Renderer extends RendererModule{
|
||||
|
||||
if(players[0].isDead()){
|
||||
TileEntity core = players[0].getClosestCore();
|
||||
if(core != null){
|
||||
if(core != null && players[0].spawner == -1){
|
||||
smoothCamera(core.x, core.y, 0.08f);
|
||||
}else{
|
||||
smoothCamera(position.x + 0.0001f, position.y + 0.0001f, 0.08f);
|
||||
|
||||
@@ -789,6 +789,10 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
this.dead = true;
|
||||
}
|
||||
|
||||
public void endRespawning(){
|
||||
spawner = -1;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region read and write methods
|
||||
|
||||
@@ -11,8 +11,6 @@ import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
|
||||
import static io.anuke.mindustry.Vars.mobile;
|
||||
|
||||
//TODO merge unit type with mech
|
||||
public class Mech extends UnlockableContent{
|
||||
public final String name;
|
||||
@@ -73,11 +71,6 @@ public class Mech extends UnlockableContent{
|
||||
|
||||
public void onLand(Player player){}
|
||||
|
||||
@Override
|
||||
public boolean isHidden() {
|
||||
return !flying && mobile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayInfo(Table table){
|
||||
ContentDisplay.displayMech(table, this);
|
||||
|
||||
@@ -29,16 +29,13 @@ import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Lines;
|
||||
import io.anuke.ucore.util.EnumSet;
|
||||
import io.anuke.ucore.util.Log;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import static io.anuke.mindustry.Vars.netServer;
|
||||
import static io.anuke.mindustry.Vars.state;
|
||||
import static io.anuke.mindustry.Vars.unitGroups;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class CoreBlock extends StorageBlock{
|
||||
protected float droneRespawnDuration = 60 * 6;
|
||||
@@ -74,6 +71,10 @@ public class CoreBlock extends StorageBlock{
|
||||
entity.currentUnit.setNet(tile.drawx(), tile.drawy());
|
||||
entity.currentUnit.add();
|
||||
entity.currentUnit = null;
|
||||
|
||||
if(player instanceof Player){
|
||||
((Player) player).endRespawning();
|
||||
}
|
||||
}
|
||||
|
||||
@Remote(called = Loc.server)
|
||||
|
||||
@@ -93,6 +93,7 @@ public class MechPad extends Block{
|
||||
|
||||
entity.progress = 0;
|
||||
entity.player.heal();
|
||||
entity.player.endRespawning();
|
||||
entity.open = true;
|
||||
entity.player.setDead(false);
|
||||
entity.player.inventory.clear();
|
||||
|
||||
Reference in New Issue
Block a user