Fixed more flaky tests

This commit is contained in:
Anuken
2021-06-26 20:55:52 -04:00
parent 604e6f8c47
commit bc6fcbc86d
5 changed files with 15 additions and 13 deletions

View File

@@ -28,6 +28,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
public static final TextureRegion[] regions = new TextureRegion[frames];
@Import float time, lifetime, x, y;
@Import int id;
Tile tile;
private transient Block block;
@@ -116,7 +117,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
Draw.alpha(Mathf.clamp(warmup / warmupDuration));
Draw.z(Layer.effect);
Draw.rect(regions[Math.min((int)animation, regions.length - 1)], x, y);
Draw.rect(regions[Math.min((int)animation, regions.length - 1)], x + Mathf.randomSeedRange((int)y, 2), y + Mathf.randomSeedRange((int)x, 2));
Draw.reset();
Drawf.light(x, y, 50f + Mathf.absin(5f, 5f), Pal.lightFlame, 0.6f * Mathf.clamp(warmup / warmupDuration));