Sprite cleanup
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 87 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 92 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 102 B |
Before Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 106 B |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1007 KiB |
@ -47,18 +47,18 @@ public class Mindustry extends ApplicationCore{
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
long lastFrameTime = Time.millis();
|
||||
long lastFrameTime = Time.nanos();
|
||||
|
||||
super.update();
|
||||
|
||||
int fpsCap = Core.settings.getInt("fpscap", 125);
|
||||
|
||||
if(fpsCap <= 120){
|
||||
long target = 1000/fpsCap;
|
||||
long elapsed = Time.timeSinceMillis(lastFrameTime);
|
||||
long target = (1000 * 1000000)/fpsCap; //target in nanos
|
||||
long elapsed = Time.timeSinceNanos(lastFrameTime);
|
||||
if(elapsed < target){
|
||||
try{
|
||||
Thread.sleep(target - elapsed);
|
||||
Thread.sleep((target - elapsed) / 1000000, (int)((target - elapsed) % 1000000));
|
||||
}catch(InterruptedException e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ public class Pathfinder{
|
||||
private void updateFrontier(Team team, long nsToRun){
|
||||
PathData path = paths[team.ordinal()];
|
||||
|
||||
long start = Time.nanoTime();
|
||||
long start = Time.nanos();
|
||||
|
||||
while(path.frontier.size > 0 && (nsToRun < 0 || Time.timeSinceNanos(start) <= nsToRun)){
|
||||
Tile tile = path.frontier.removeLast();
|
||||
|
@ -112,12 +112,12 @@ public class Zones implements ContentList{
|
||||
deployCost = ItemStack.with(Items.copper, 300);
|
||||
startingItems = ItemStack.with(Items.copper, 200);
|
||||
conditionWave = 15;
|
||||
zoneRequirements = new Zone[]{frozenForest};
|
||||
zoneRequirements = new Zone[]{craters};
|
||||
blockRequirements = new Block[]{Blocks.copperWall};
|
||||
rules = () -> new Rules(){{
|
||||
waves = true;
|
||||
waveTimer = true;
|
||||
waveSpacing = 60 * 80;
|
||||
waveSpacing = 60 * 60 * 2;
|
||||
}};
|
||||
}};
|
||||
|
||||
|
@ -21,11 +21,10 @@ import static io.anuke.mindustry.Vars.*;
|
||||
*/
|
||||
public class Units{
|
||||
private static Rectangle rect = new Rectangle();
|
||||
private static Rectangle rectGraphics = new Rectangle();
|
||||
private static Rectangle hitrect = new Rectangle();
|
||||
private static Unit result;
|
||||
private static float cdist;
|
||||
private static boolean boolResult, boolResultGraphics;
|
||||
private static boolean boolResult;
|
||||
|
||||
/**
|
||||
* Validates a target.
|
||||
|