Fixed trail length bug / Base projector classes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user