Fixed breakable cores / Fixed sector sandbox / Fixed ship warp speed
This commit is contained in:
@@ -8,6 +8,7 @@ import com.badlogic.gdx.math.Vector2;
|
||||
import io.anuke.mindustry.content.fx.Fx;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
import io.anuke.mindustry.entities.effect.GroundEffectEntity;
|
||||
import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect;
|
||||
@@ -143,7 +144,12 @@ public class Renderer extends RendererModule{
|
||||
Vector2 position = averagePosition();
|
||||
|
||||
if(players[0].isDead()){
|
||||
smoothCamera(position.x + 0.0001f, position.y + 0.0001f, 0.08f);
|
||||
TileEntity core = players[0].getClosestCore();
|
||||
if(core != null){
|
||||
smoothCamera(core.x, core.y, 0.08f);
|
||||
}else{
|
||||
smoothCamera(position.x + 0.0001f, position.y + 0.0001f, 0.08f);
|
||||
}
|
||||
}else if(!mobile){
|
||||
setCamera(position.x + 0.0001f, position.y + 0.0001f);
|
||||
}
|
||||
|
||||
@@ -209,6 +209,7 @@ public class World extends Module{
|
||||
public void loadSector(Sector sector){
|
||||
currentSector = sector;
|
||||
state.difficulty = sectors.getDifficulty(sector);
|
||||
state.mode = sector.currentMission().getMode();
|
||||
Timers.mark();
|
||||
Timers.mark();
|
||||
|
||||
@@ -254,6 +255,8 @@ public class World extends Module{
|
||||
return;
|
||||
}
|
||||
|
||||
endMapLoad();
|
||||
|
||||
if(!headless && state.teams.get(players[0].getTeam()).cores.size == 0){
|
||||
ui.showError("$text.map.nospawn");
|
||||
threads.runDelay(() -> state.set(State.menu));
|
||||
@@ -261,8 +264,6 @@ public class World extends Module{
|
||||
}else{
|
||||
invalidMap = false;
|
||||
}
|
||||
|
||||
endMapLoad();
|
||||
}
|
||||
|
||||
public void notifyChanged(Tile tile){
|
||||
|
||||
@@ -534,7 +534,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
isBoosting = true;
|
||||
}
|
||||
|
||||
float speed = isBoosting ? mech.boostSpeed : mech.speed;
|
||||
float speed = isBoosting && !mech.flying ? mech.boostSpeed : mech.speed;
|
||||
//fraction of speed when at max load
|
||||
float carrySlowdown = 0.7f;
|
||||
|
||||
|
||||
@@ -429,10 +429,11 @@ public class Tile implements PosTrait, TargetTrait{
|
||||
entity.power = new PowerModule();
|
||||
entity.power.graph.add(this);
|
||||
}
|
||||
|
||||
if(!world.isGenerating()){
|
||||
entity.updateProximity();
|
||||
}
|
||||
}else if(!(block instanceof BlockPart)){
|
||||
}else if(!(block instanceof BlockPart) && !world.isGenerating()){
|
||||
//since the entity won't update proximity for us, update proximity for all nearby tiles manually
|
||||
for(GridPoint2 p : Geometry.d4){
|
||||
Tile tile = world.tile(x + p.x, y + p.y);
|
||||
|
||||
@@ -29,6 +29,7 @@ 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;
|
||||
@@ -82,7 +83,6 @@ public class CoreBlock extends StorageBlock{
|
||||
|
||||
@Override
|
||||
public void onProximityUpdate(Tile tile) {
|
||||
//add cores
|
||||
state.teams.get(tile.getTeam()).cores.add(tile);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user