mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-14 17:57:56 +07:00
Fixed fog not clearing, movement bug, items stuck in blocks
This commit is contained in:
@ -27,7 +27,7 @@ allprojects {
|
|||||||
gdxVersion = '1.9.8'
|
gdxVersion = '1.9.8'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.0'
|
||||||
aiVersion = '1.8.1'
|
aiVersion = '1.8.1'
|
||||||
uCoreVersion = 'da40998ac6'
|
uCoreVersion = 'dbc818f4ab'
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
|
@ -126,9 +126,7 @@ public class Logic extends Module {
|
|||||||
Timers.update();
|
Timers.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!debug){
|
|
||||||
checkGameOver();
|
checkGameOver();
|
||||||
}
|
|
||||||
|
|
||||||
if(!state.is(State.paused) || Net.active()){
|
if(!state.is(State.paused) || Net.active()){
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ public class Renderer extends RendererModule{
|
|||||||
Vector2 position = averagePosition();
|
Vector2 position = averagePosition();
|
||||||
|
|
||||||
if(!mobile){
|
if(!mobile){
|
||||||
setCamera(position.x, position.y);
|
setCamera(position.x + 0.0001f, position.y + 0.0001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
clampCamera(-tilesize / 2f, -tilesize / 2f + 1, world.width() * tilesize - tilesize / 2f, world.height() * tilesize - tilesize / 2f);
|
clampCamera(-tilesize / 2f, -tilesize / 2f + 1, world.width() * tilesize - tilesize / 2f, world.height() * tilesize - tilesize / 2f);
|
||||||
|
@ -279,8 +279,8 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
|||||||
float px = x, py =y;
|
float px = x, py =y;
|
||||||
|
|
||||||
if(snap){
|
if(snap){
|
||||||
x = (int)x;
|
x = (int)(x + 0.0001f);
|
||||||
y = (int)y;
|
y = (int)(y + 0.0001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
float ft = Mathf.sin(walktime, 6f, 2f) * (1f-boostHeat);
|
float ft = Mathf.sin(walktime, 6f, 2f) * (1f-boostHeat);
|
||||||
|
@ -166,7 +166,11 @@ public class ItemDrop extends SolidEntity implements SaveTrait, SyncTrait, DrawT
|
|||||||
|
|
||||||
Tile tile = world.tileWorld(x, y);
|
Tile tile = world.tileWorld(x, y);
|
||||||
|
|
||||||
if(tile.floor().isLiquid){
|
if(tile != null && tile.solid()){
|
||||||
|
CallEntity.onPickup(getID());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tile != null && tile.floor().isLiquid){
|
||||||
sinktime += Timers.delta();
|
sinktime += Timers.delta();
|
||||||
|
|
||||||
if(Mathf.chance(0.04 * Timers.delta())){
|
if(Mathf.chance(0.04 * Timers.delta())){
|
||||||
|
@ -34,6 +34,7 @@ public class FogRenderer implements Disposable{
|
|||||||
Events.on(WorldLoadGraphicsEvent.class, () -> {
|
Events.on(WorldLoadGraphicsEvent.class, () -> {
|
||||||
dispose();
|
dispose();
|
||||||
buffer = new FrameBuffer(Format.RGBA8888, world.width(), world.height(), false);
|
buffer = new FrameBuffer(Format.RGBA8888, world.width(), world.height(), false);
|
||||||
|
changeQueue.clear();
|
||||||
|
|
||||||
//clear buffer to black
|
//clear buffer to black
|
||||||
buffer.begin();
|
buffer.begin();
|
||||||
@ -101,6 +102,8 @@ public class FogRenderer implements Disposable{
|
|||||||
Fill.circle(tile.drawx(), tile.drawy(), tile.block().viewRange);
|
Fill.circle(tile.drawx(), tile.drawy(), tile.block().viewRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeQueue.clear();
|
||||||
|
|
||||||
EntityDraw.setClip(true);
|
EntityDraw.setClip(true);
|
||||||
Graphics.end();
|
Graphics.end();
|
||||||
buffer.end();
|
buffer.end();
|
||||||
|
@ -176,8 +176,8 @@ public class OverlayRenderer {
|
|||||||
float y = unit.y;
|
float y = unit.y;
|
||||||
|
|
||||||
if(unit == players[0] && players.length == 1 && snapCamera) {
|
if(unit == players[0] && players.length == 1 && snapCamera) {
|
||||||
x = (int)x;
|
x = (int)(x + 0.0001f);
|
||||||
y = (int)y;
|
y = (int)(y + 0.0001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
drawEncloser(x, y - 8f, 2f);
|
drawEncloser(x, y - 8f, 2f);
|
||||||
|
@ -7,6 +7,7 @@ import io.anuke.mindustry.entities.TileEntity;
|
|||||||
import io.anuke.mindustry.entities.effect.Fire;
|
import io.anuke.mindustry.entities.effect.Fire;
|
||||||
import io.anuke.mindustry.entities.units.BaseUnit;
|
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||||
import io.anuke.mindustry.entities.units.UnitType;
|
import io.anuke.mindustry.entities.units.UnitType;
|
||||||
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
import io.anuke.mindustry.ui.dialogs.FloatingDialog;
|
import io.anuke.mindustry.ui.dialogs.FloatingDialog;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
@ -69,6 +70,11 @@ public class DebugFragment implements Fragment {
|
|||||||
row();
|
row();
|
||||||
new button("fog", () -> showFog = !showFog);
|
new button("fog", () -> showFog = !showFog);
|
||||||
row();
|
row();
|
||||||
|
new button("gameover", () ->{
|
||||||
|
state.teams.get(Team.blue).cores.get(0).entity.health = 0;
|
||||||
|
state.teams.get(Team.blue).cores.get(0).entity.damage(1);
|
||||||
|
});
|
||||||
|
row();
|
||||||
new button("wave", () -> state.wavetime = 0f);
|
new button("wave", () -> state.wavetime = 0f);
|
||||||
row();
|
row();
|
||||||
new button("death", () -> player.damage(99999, true));
|
new button("death", () -> player.damage(99999, true));
|
||||||
|
@ -17,6 +17,8 @@ import java.io.DataInputStream;
|
|||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static io.anuke.mindustry.Vars.threads;
|
||||||
|
|
||||||
public class Door extends Wall{
|
public class Door extends Wall{
|
||||||
protected final Rectangle rect = new Rectangle();
|
protected final Rectangle rect = new Rectangle();
|
||||||
|
|
||||||
@ -64,6 +66,8 @@ public class Door extends Wall{
|
|||||||
public void tapped(Tile tile, Player player){
|
public void tapped(Tile tile, Player player){
|
||||||
DoorEntity entity = tile.entity();
|
DoorEntity entity = tile.entity();
|
||||||
|
|
||||||
|
threads.run(() -> {
|
||||||
|
|
||||||
if(Units.anyEntities(tile) && entity.open){
|
if(Units.anyEntities(tile) && entity.open){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -74,6 +78,7 @@ public class Door extends Wall{
|
|||||||
}else{
|
}else{
|
||||||
Effects.effect(openfx, tile.drawx(), tile.drawy());
|
Effects.effect(openfx, tile.drawx(), tile.drawy());
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user