mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +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'
|
||||
roboVMVersion = '2.3.0'
|
||||
aiVersion = '1.8.1'
|
||||
uCoreVersion = 'da40998ac6'
|
||||
uCoreVersion = 'dbc818f4ab'
|
||||
|
||||
getVersionString = {
|
||||
String buildVersion = getBuildVersion()
|
||||
|
@ -126,9 +126,7 @@ public class Logic extends Module {
|
||||
Timers.update();
|
||||
}
|
||||
|
||||
if(!debug){
|
||||
checkGameOver();
|
||||
}
|
||||
|
||||
if(!state.is(State.paused) || Net.active()){
|
||||
|
||||
|
@ -151,7 +151,7 @@ public class Renderer extends RendererModule{
|
||||
Vector2 position = averagePosition();
|
||||
|
||||
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);
|
||||
|
@ -279,8 +279,8 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
float px = x, py =y;
|
||||
|
||||
if(snap){
|
||||
x = (int)x;
|
||||
y = (int)y;
|
||||
x = (int)(x + 0.0001f);
|
||||
y = (int)(y + 0.0001f);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
if(tile.floor().isLiquid){
|
||||
if(tile != null && tile.solid()){
|
||||
CallEntity.onPickup(getID());
|
||||
}
|
||||
|
||||
if(tile != null && tile.floor().isLiquid){
|
||||
sinktime += Timers.delta();
|
||||
|
||||
if(Mathf.chance(0.04 * Timers.delta())){
|
||||
|
@ -34,6 +34,7 @@ public class FogRenderer implements Disposable{
|
||||
Events.on(WorldLoadGraphicsEvent.class, () -> {
|
||||
dispose();
|
||||
buffer = new FrameBuffer(Format.RGBA8888, world.width(), world.height(), false);
|
||||
changeQueue.clear();
|
||||
|
||||
//clear buffer to black
|
||||
buffer.begin();
|
||||
@ -101,6 +102,8 @@ public class FogRenderer implements Disposable{
|
||||
Fill.circle(tile.drawx(), tile.drawy(), tile.block().viewRange);
|
||||
}
|
||||
|
||||
changeQueue.clear();
|
||||
|
||||
EntityDraw.setClip(true);
|
||||
Graphics.end();
|
||||
buffer.end();
|
||||
|
@ -176,8 +176,8 @@ public class OverlayRenderer {
|
||||
float y = unit.y;
|
||||
|
||||
if(unit == players[0] && players.length == 1 && snapCamera) {
|
||||
x = (int)x;
|
||||
y = (int)y;
|
||||
x = (int)(x + 0.0001f);
|
||||
y = (int)(y + 0.0001f);
|
||||
}
|
||||
|
||||
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.units.BaseUnit;
|
||||
import io.anuke.mindustry.entities.units.UnitType;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.ui.dialogs.FloatingDialog;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
@ -69,6 +70,11 @@ public class DebugFragment implements Fragment {
|
||||
row();
|
||||
new button("fog", () -> showFog = !showFog);
|
||||
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);
|
||||
row();
|
||||
new button("death", () -> player.damage(99999, true));
|
||||
|
@ -17,6 +17,8 @@ import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import static io.anuke.mindustry.Vars.threads;
|
||||
|
||||
public class Door extends Wall{
|
||||
protected final Rectangle rect = new Rectangle();
|
||||
|
||||
@ -64,6 +66,8 @@ public class Door extends Wall{
|
||||
public void tapped(Tile tile, Player player){
|
||||
DoorEntity entity = tile.entity();
|
||||
|
||||
threads.run(() -> {
|
||||
|
||||
if(Units.anyEntities(tile) && entity.open){
|
||||
return;
|
||||
}
|
||||
@ -74,6 +78,7 @@ public class Door extends Wall{
|
||||
}else{
|
||||
Effects.effect(openfx, tile.drawx(), tile.drawy());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user