Fixed trail length bug / Base projector classes

This commit is contained in:
Anuken
2018-09-06 12:25:38 -04:00
parent f47fb01614
commit 6e6edf8322
4 changed files with 22 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ public class Bullet extends BulletEntity<BulletType> implements TeamTrait, SyncT
bullet.lastPosition().set(x - bullet.velocity.x * backDelta, y - bullet.velocity.y * backDelta, bullet.angle());
bullet.setLastUpdated(TimeUtils.millis());
bullet.setUpdateSpacing((long) ((Timers.delta() / 60f) * 1000));
bullet.set(x - bullet.velocity.x * backDelta, y - bullet.velocity.y * backDelta);
bullet.set(x, y);
bullet.add();
}

View File

@@ -29,7 +29,7 @@ public class Trail{
points.add(curx, cury);
if(points.size > (int)(length * 2 / Math.min(Timers.delta(), 1f))){
while(points.size > (int)(length * 2 / Math.min(Timers.delta(), 1f))){
float[] items = points.items;
System.arraycopy(items, 2, items, 0, points.size - 2);
points.size -= 2;

View File

@@ -0,0 +1,10 @@
package io.anuke.mindustry.world.blocks.defense;
import io.anuke.mindustry.world.Block;
public class ForceProjector extends Block {
public ForceProjector(String name) {
super(name);
}
}

View File

@@ -0,0 +1,10 @@
package io.anuke.mindustry.world.blocks.defense;
import io.anuke.mindustry.world.Block;
public class OverdriveProjector extends Block {
public OverdriveProjector(String name) {
super(name);
}
}