Bugfixes
This commit is contained in:
@@ -6,7 +6,6 @@ import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.graphics.gl.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
@@ -33,7 +32,6 @@ public class Renderer implements ApplicationListener{
|
||||
private float camerascale = targetscale;
|
||||
private float landscale = 0f, landTime;
|
||||
private float minZoomScl = Scl.scl(0.01f);
|
||||
private Rect rect = new Rect(), rect2 = new Rect();
|
||||
private float shakeIntensity, shaketime;
|
||||
|
||||
public Renderer(){
|
||||
@@ -169,6 +167,8 @@ public class Renderer implements ApplicationListener{
|
||||
|
||||
Draw.proj(camera.projection());
|
||||
|
||||
drawBackground();
|
||||
|
||||
blocks.floor.drawFloor();
|
||||
|
||||
Groups.drawFloor();
|
||||
@@ -183,7 +183,9 @@ public class Renderer implements ApplicationListener{
|
||||
blocks.floor.endDraw();
|
||||
|
||||
blocks.drawBlocks(Layer.block);
|
||||
blocks.drawFog();
|
||||
if(state.rules.drawFog){
|
||||
blocks.drawFog();
|
||||
}
|
||||
|
||||
blocks.drawDestroyed();
|
||||
|
||||
@@ -240,6 +242,10 @@ public class Renderer implements ApplicationListener{
|
||||
Draw.flush();
|
||||
}
|
||||
|
||||
private void drawBackground(){
|
||||
|
||||
}
|
||||
|
||||
private void drawLanding(){
|
||||
if(landTime > 0 && player.closestCore() != null){
|
||||
float fract = landTime / Fx.coreLand.lifetime;
|
||||
|
||||
@@ -376,8 +376,8 @@ public class World{
|
||||
}
|
||||
}
|
||||
|
||||
Tile tile = world.rawTile(x, y);
|
||||
if(tile.block().solid && tile.block().fillsTile && !tile.block().synthetic()){
|
||||
Tile tile = world.tile(x, y);
|
||||
if(tile != null && tile.block().solid && tile.block().fillsTile && !tile.block().synthetic()){
|
||||
dark = Math.max(dark, tile.rotation());
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ abstract class UnitComp implements Healthc, Velc, Statusc, Teamc, Itemsc, Hitbox
|
||||
}
|
||||
|
||||
public void lookAt(float angle){
|
||||
rotation = Angles.moveToward(rotation, angle, type.rotateSpeed);
|
||||
rotation = Angles.moveToward(rotation, angle, type.rotateSpeed * Time.delta());
|
||||
}
|
||||
|
||||
public void lookAt(Position pos){
|
||||
|
||||
@@ -68,7 +68,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
|
||||
axisY = this.y + Angles.trnsy(rotation, axisXOffset, weapon.y);
|
||||
|
||||
mount.targetRotation = Angles.angle(axisX, axisY, mount.aimX, mount.aimY) - rotation();
|
||||
mount.rotation = Angles.moveToward(mount.rotation, mount.targetRotation, weapon.rotateSpeed);
|
||||
mount.rotation = Angles.moveToward(mount.rotation, mount.targetRotation, weapon.rotateSpeed * Time.delta());
|
||||
}else{
|
||||
mount.rotation = this.rotation;
|
||||
mount.targetRotation = angleTo(mount.aimX, mount.aimY);
|
||||
|
||||
@@ -74,6 +74,9 @@ public class Rules{
|
||||
public boolean tutorial = false;
|
||||
/** Whether a gameover can happen at all. Set this to false to implement custom gameover conditions. */
|
||||
public boolean canGameOver = true;
|
||||
/** Whether to draw shadows of blocks at map edges and static blocks.
|
||||
* Do not change unless you know exactly what you are doing.*/
|
||||
public boolean drawFog = true;
|
||||
/** Starting items put in cores */
|
||||
public Array<ItemStack> loadout = Array.with(ItemStack.with(Items.copper, 100));
|
||||
/** Blocks that cannot be placed. */
|
||||
|
||||
@@ -82,15 +82,15 @@ public class Build{
|
||||
return false;
|
||||
}
|
||||
|
||||
Tile tile = world.tile(x, y);
|
||||
|
||||
if(tile == null) return false;
|
||||
|
||||
//ca check
|
||||
if(world.getDarkness(x, y) >= 3){
|
||||
return false;
|
||||
}
|
||||
|
||||
Tile tile = world.tile(x, y);
|
||||
|
||||
if(tile == null) return false;
|
||||
|
||||
if(type.isMultiblock()){
|
||||
if(type.canReplace(tile.block()) && tile.block().size == type.size && type.canPlaceOn(tile) && tile.interactable(team)){
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user