Halved turret fire rate on Android to prevent lag
This commit is contained in:
@@ -13,7 +13,6 @@ import io.anuke.mindustry.input.GestureHandler;
|
||||
import io.anuke.mindustry.input.Input;
|
||||
import io.anuke.mindustry.world.Generator;
|
||||
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||
import io.anuke.ucore.UCore;
|
||||
import io.anuke.ucore.core.*;
|
||||
import io.anuke.ucore.entities.Entities;
|
||||
import io.anuke.ucore.graphics.Atlas;
|
||||
@@ -152,7 +151,6 @@ public class Control extends RendererModule{
|
||||
clampCamera(-tilesize / 2f, -tilesize / 2f, pixsize - tilesize / 2f, pixsize - tilesize / 2f);
|
||||
|
||||
if(android){
|
||||
UCore.log(camera.position.x-prevx, camera.position.y-prevy);
|
||||
player.x += camera.position.x-prevx;
|
||||
player.y += camera.position.y-prevy;
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ public class UI extends SceneModule{
|
||||
Gdx.app.exit();
|
||||
}).width(w);
|
||||
|
||||
get().pad(20);
|
||||
get().pad(Unit.dp.inPixels(20));
|
||||
}};
|
||||
|
||||
get().setVisible(nplay);
|
||||
|
||||
@@ -90,6 +90,7 @@ public class Turret extends Block{
|
||||
|
||||
if(enemy != null){
|
||||
entity.rotation = MathUtils.lerpAngleDeg(entity.rotation, Angles.predictAngle(tile.worldx(), tile.worldy(), enemy.x, enemy.y, enemy.xvelocity, enemy.yvelocity, bullet.speed - 0.1f), 0.2f);
|
||||
float reload = Vars.android ? this.reload*2 : this.reload;
|
||||
if(Timers.get(tile, reload)){
|
||||
Effects.sound(shootsound, entity);
|
||||
shoot(tile);
|
||||
@@ -112,7 +113,11 @@ public class Turret extends Block{
|
||||
}
|
||||
|
||||
protected void bullet(Tile tile, float angle){
|
||||
new Bullet(bullet, tile.entity, tile.worldx()+vector.x, tile.worldy()+vector.y, angle).add();
|
||||
Bullet out = new Bullet(bullet, tile.entity, tile.worldx()+vector.x, tile.worldy()+vector.y, angle).add();
|
||||
|
||||
if(Vars.android){
|
||||
out.damage *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
static class TurretEntity extends TileEntity{
|
||||
|
||||
Reference in New Issue
Block a user