mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Fixed glitchy interpolation and block bars
This commit is contained in:
parent
618fe6894e
commit
2ba38c2ee3
4 changed files with 3 additions and 6 deletions
|
|
@ -411,7 +411,7 @@ public class Renderer extends RendererModule{
|
|||
|
||||
if(target.entity != null) {
|
||||
int bot = 0, top = 0;
|
||||
for (BlockBar bar : tile.block().bars) {
|
||||
for (BlockBar bar : target.block().bars) {
|
||||
float offset = Mathf.sign(bar.top) * (target.block().height / 2f * tilesize + 3f + 4f * ((bar.top ? top : bot))) +
|
||||
(bar.top ? -1f : 0f);
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ public class Player extends SyncEntity{
|
|||
interpolator.time = 0f;
|
||||
interpolator.last.set(this.x, this.y);
|
||||
interpolator.target.set(x, y);
|
||||
interpolator.spacing = Math.max(((TimeUtils.timeSinceMillis(time) / 1000f) * 60f), 1f);
|
||||
interpolator.spacing = Math.max(((TimeUtils.timeSinceMillis(time) / 1000f) * 60f), 4f);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public class Enemy extends SyncEntity {
|
|||
interpolator.time = 0f;
|
||||
interpolator.last.set(this.x, this.y);
|
||||
interpolator.target.set(x, y);
|
||||
interpolator.spacing = Math.max(((TimeUtils.timeSinceMillis(time) / 1000f) * 60f), 1f);
|
||||
interpolator.spacing = Math.max(((TimeUtils.timeSinceMillis(time) / 1000f) * 60f), 4f);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import io.anuke.mindustry.world.blocks.Blocks;
|
|||
import io.anuke.mindustry.world.blocks.types.BlockPart;
|
||||
import io.anuke.mindustry.world.blocks.types.Rock;
|
||||
import io.anuke.ucore.core.Core;
|
||||
import io.anuke.ucore.util.Log;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
|
|
@ -191,8 +190,6 @@ public class Save15 extends SaveFileVersion {
|
|||
|
||||
Tile tile = world.tile(pos % world.width(), pos / world.width());
|
||||
|
||||
Log.info("Load tile {0} {1}", pos, blockid > Block.getAllBlocks().size || blockid < 0 ? null : Block.getByID(blockid));
|
||||
|
||||
tile.setBlock(map.get(blockid));
|
||||
|
||||
if(blockid == Blocks.blockpart.id){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue