mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-21 21:28:28 +07:00
Removed camera clamping for custom maps
This commit is contained in:
@ -160,13 +160,8 @@ public class Renderer extends RendererModule{
|
||||
}else if(!mobile){
|
||||
setCamera(position.x + 0.0001f, position.y + 0.0001f);
|
||||
}
|
||||
|
||||
if(world.getSector() == null){
|
||||
clampCamera(-tilesize / 2f, -tilesize / 2f + 1, world.width() * tilesize - tilesize / 2f, world.height() * tilesize - tilesize / 2f);
|
||||
}else{
|
||||
camera.position.x = Mathf.clamp(camera.position.x, -tilesize / 2f, world.width() * tilesize - tilesize / 2f);
|
||||
camera.position.y = Mathf.clamp(camera.position.y, -tilesize / 2f, world.height() * tilesize - tilesize / 2f);
|
||||
}
|
||||
camera.position.x = Mathf.clamp(camera.position.x, -tilesize / 2f, world.width() * tilesize - tilesize / 2f);
|
||||
camera.position.y = Mathf.clamp(camera.position.y, -tilesize / 2f, world.height() * tilesize - tilesize / 2f);
|
||||
|
||||
float prex = camera.position.x, prey = camera.position.y;
|
||||
updateShake(0.75f);
|
||||
|
@ -242,10 +242,12 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
Effects.effect(floor.walkEffect, floor.liquidColor, x, y);
|
||||
}
|
||||
|
||||
status.handleApply(this, floor.status, floor.statusIntensity);
|
||||
if(onLiquid){
|
||||
status.handleApply(this, floor.status, floor.statusIntensity);
|
||||
|
||||
if(floor.damageTaken > 0f){
|
||||
damagePeriodic(floor.damageTaken);
|
||||
if(floor.damageTaken > 0f){
|
||||
damagePeriodic(floor.damageTaken);
|
||||
}
|
||||
}
|
||||
|
||||
if(onLiquid && floor.drownTime > 0){
|
||||
|
@ -29,13 +29,14 @@ import static io.anuke.mindustry.Vars.*;
|
||||
/**Used for rendering fog of war. A framebuffer is used for this.*/
|
||||
public class FogRenderer implements Disposable{
|
||||
private static final int extraPadding = 3;
|
||||
private static final int shadowPadding = 1;
|
||||
private static final int fshadowPadding = 1;
|
||||
|
||||
private TextureRegion region = new TextureRegion();
|
||||
private FrameBuffer buffer;
|
||||
private ByteBuffer pixelBuffer;
|
||||
private Array<Tile> changeQueue = new Array<>();
|
||||
private int padding;
|
||||
private int shadowPadding;
|
||||
private Rectangle rect = new Rectangle();
|
||||
private boolean dirty;
|
||||
|
||||
@ -44,6 +45,7 @@ public class FogRenderer implements Disposable{
|
||||
dispose();
|
||||
|
||||
padding = world.getSector() != null ? mapPadding + extraPadding : 0;
|
||||
shadowPadding = world.getSector() != null ? fshadowPadding : -1;
|
||||
|
||||
buffer = new FrameBuffer(Format.RGBA8888, world.width() + padding*2, world.height() + padding*2, false);
|
||||
changeQueue.clear();
|
||||
|
Reference in New Issue
Block a user