Bugfixes
|
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 889 B After Width: | Height: | Size: 5.3 KiB |
@@ -399,7 +399,7 @@ public class Bullets implements ContentList{
|
|||||||
super.hit(b);
|
super.hit(b);
|
||||||
tile = tile.link();
|
tile = tile.link();
|
||||||
|
|
||||||
if(tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
|
if(tile.entity != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
|
||||||
Effects.effect(Fx.healBlockFull, Pal.heal, tile.drawx(), tile.drawy(), tile.block().size);
|
Effects.effect(Fx.healBlockFull, Pal.heal, tile.drawx(), tile.drawy(), tile.block().size);
|
||||||
tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth());
|
tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
long elapsed = Time.timeSinceMillis(connection.lastRecievedClientTime);
|
long elapsed = Time.timeSinceMillis(connection.lastRecievedClientTime);
|
||||||
|
|
||||||
float maxSpeed = boosting && !player.mech.flying ? player.mech.boostSpeed : player.mech.speed;
|
float maxSpeed = boosting && !player.mech.flying ? player.mech.boostSpeed : player.mech.speed;
|
||||||
float maxMove = elapsed / 1000f * 60f * Math.min(compound(maxSpeed, player.mech.drag) * 1.25f, player.mech.maxSpeed * 1.1f);
|
float maxMove = elapsed / 1000f * 60f * Math.min(compound(maxSpeed, player.mech.drag) * 1.25f, player.mech.maxSpeed * 1.2f);
|
||||||
|
|
||||||
player.pointerX = pointerX;
|
player.pointerX = pointerX;
|
||||||
player.pointerY = pointerY;
|
player.pointerY = pointerY;
|
||||||
@@ -284,6 +284,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
player.isShooting = shooting;
|
player.isShooting = shooting;
|
||||||
player.buildQueue().clear();
|
player.buildQueue().clear();
|
||||||
for(BuildRequest req : requests){
|
for(BuildRequest req : requests){
|
||||||
|
if(req == null) continue;
|
||||||
Tile tile = world.tile(req.x, req.y);
|
Tile tile = world.tile(req.x, req.y);
|
||||||
if(tile == null) continue;
|
if(tile == null) continue;
|
||||||
//auto-skip done requests
|
//auto-skip done requests
|
||||||
@@ -296,7 +297,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
vector.set(x - player.getInterpolator().target.x, y - player.getInterpolator().target.y);
|
vector.set(x - player.getInterpolator().target.x, y - player.getInterpolator().target.y);
|
||||||
//vector.limit(maxMove);
|
vector.limit(maxMove);
|
||||||
|
|
||||||
float prevx = player.x, prevy = player.y;
|
float prevx = player.x, prevy = player.y;
|
||||||
player.set(player.getInterpolator().target.x, player.getInterpolator().target.y);
|
player.set(player.getInterpolator().target.x, player.getInterpolator().target.y);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package io.anuke.mindustry.core;
|
package io.anuke.mindustry.core;
|
||||||
|
|
||||||
import io.anuke.arc.ApplicationListener;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.Core;
|
|
||||||
import io.anuke.arc.files.FileHandle;
|
import io.anuke.arc.files.FileHandle;
|
||||||
import io.anuke.arc.function.Consumer;
|
import io.anuke.arc.function.Consumer;
|
||||||
import io.anuke.arc.function.Predicate;
|
import io.anuke.arc.function.Predicate;
|
||||||
@@ -21,6 +20,7 @@ import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect;
|
|||||||
import io.anuke.mindustry.entities.impl.EffectEntity;
|
import io.anuke.mindustry.entities.impl.EffectEntity;
|
||||||
import io.anuke.mindustry.entities.traits.*;
|
import io.anuke.mindustry.entities.traits.*;
|
||||||
import io.anuke.mindustry.entities.type.*;
|
import io.anuke.mindustry.entities.type.*;
|
||||||
|
import io.anuke.mindustry.game.EventType.DisposeEvent;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.graphics.*;
|
import io.anuke.mindustry.graphics.*;
|
||||||
import io.anuke.mindustry.world.blocks.defense.ForceProjector.ShieldEntity;
|
import io.anuke.mindustry.world.blocks.defense.ForceProjector.ShieldEntity;
|
||||||
@@ -130,6 +130,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
minimap.dispose();
|
minimap.dispose();
|
||||||
shieldBuffer.dispose();
|
shieldBuffer.dispose();
|
||||||
blocks.dispose();
|
blocks.dispose();
|
||||||
|
Events.fire(new DisposeEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateShake(float scale){
|
void updateShake(float scale){
|
||||||
|
|||||||
@@ -8,22 +8,14 @@ import io.anuke.arc.math.Mathf;
|
|||||||
import static io.anuke.mindustry.Vars.headless;
|
import static io.anuke.mindustry.Vars.headless;
|
||||||
|
|
||||||
public class RubbleDecal extends Decal{
|
public class RubbleDecal extends Decal{
|
||||||
private static final TextureRegion[][] regions = new TextureRegion[16][0];
|
|
||||||
private TextureRegion region;
|
private TextureRegion region;
|
||||||
|
|
||||||
/** Creates a rubble effect at a position. Provide a block size to use. */
|
/** Creates a rubble effect at a position. Provide a block size to use. */
|
||||||
public static void create(float x, float y, int size){
|
public static void create(float x, float y, int size){
|
||||||
if(headless) return;
|
if(headless) return;
|
||||||
|
|
||||||
if(regions[size].length == 0 || regions[size][0].getTexture().isDisposed()){
|
|
||||||
regions[size] = new TextureRegion[2];
|
|
||||||
for(int j = 0; j < 2; j++){
|
|
||||||
regions[size][j] = Core.atlas.find("rubble-" + size + "-" + j);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RubbleDecal decal = new RubbleDecal();
|
RubbleDecal decal = new RubbleDecal();
|
||||||
decal.region = regions[size][Mathf.clamp(Mathf.randomSeed(decal.id, 0, 1), 0, regions[size].length - 1)];
|
decal.region = Core.atlas.find("rubble-" + size + "-" + Mathf.randomSeed(decal.id, 0, 1));
|
||||||
|
|
||||||
if(!Core.atlas.isFound(decal.region)){
|
if(!Core.atlas.isFound(decal.region)){
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ public class EventType{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class DisposeEvent{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static class PlayEvent{
|
public static class PlayEvent{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,10 @@ public class TypeIO{
|
|||||||
int position = buffer.getInt();
|
int position = buffer.getInt();
|
||||||
BuildRequest currentRequest;
|
BuildRequest currentRequest;
|
||||||
|
|
||||||
|
if(world.tile(position) == null){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(type == 1){ //remove
|
if(type == 1){ //remove
|
||||||
currentRequest = new BuildRequest(Pos.x(position), Pos.y(position));
|
currentRequest = new BuildRequest(Pos.x(position), Pos.y(position));
|
||||||
}else{ //place
|
}else{ //place
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public class PowerGraph{
|
|||||||
public float getPowerProduced(){
|
public float getPowerProduced(){
|
||||||
float powerProduced = 0f;
|
float powerProduced = 0f;
|
||||||
for(Tile producer : producers){
|
for(Tile producer : producers){
|
||||||
|
if(producer.entity == null) continue;
|
||||||
powerProduced += producer.block().getPowerProduction(producer) * producer.entity.delta();
|
powerProduced += producer.block().getPowerProduction(producer) * producer.entity.delta();
|
||||||
}
|
}
|
||||||
return powerProduced;
|
return powerProduced;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class DesktopPlatform extends Platform{
|
|||||||
if(e.getMessage() != null && (e.getMessage().contains("Couldn't create window") || e.getMessage().contains("OpenGL 2.0 or higher"))){
|
if(e.getMessage() != null && (e.getMessage().contains("Couldn't create window") || e.getMessage().contains("OpenGL 2.0 or higher"))){
|
||||||
|
|
||||||
dialog.accept(() -> TinyFileDialogs.tinyfd_messageBox("oh no",
|
dialog.accept(() -> TinyFileDialogs.tinyfd_messageBox("oh no",
|
||||||
e.getMessage().contains("Couldn't create window") ? "A graphics initialization error has occured! Try to update your graphics drivers.\nReport this to the developer." :
|
e.getMessage().contains("Couldn't create window") ? "A graphics initialization error has occured! Try to update your graphics drivers:\n" + e.getMessage() :
|
||||||
"Your graphics card does not support OpenGL 2.0!\n" +
|
"Your graphics card does not support OpenGL 2.0!\n" +
|
||||||
"Try to update your graphics drivers.\n\n" +
|
"Try to update your graphics drivers.\n\n" +
|
||||||
"(If that doesn't work, your computer just doesn't support Mindustry.)", "ok", "error", true));
|
"(If that doesn't work, your computer just doesn't support Mindustry.)", "ok", "error", true));
|
||||||
|
|||||||