Fixed #5348
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 158 B |
@@ -35,7 +35,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
|
|||||||
baseFlammability = -1, puddleFlammability, damageTimer = Mathf.random(40f),
|
baseFlammability = -1, puddleFlammability, damageTimer = Mathf.random(40f),
|
||||||
spreadTimer = Mathf.random(spreadDelay), fireballTimer = Mathf.random(fireballDelay),
|
spreadTimer = Mathf.random(spreadDelay), fireballTimer = Mathf.random(fireballDelay),
|
||||||
warmup = 0f,
|
warmup = 0f,
|
||||||
animation = Mathf.random(frames);
|
animation = Mathf.random(frames - 1);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
@@ -116,7 +116,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
|
|||||||
|
|
||||||
Draw.alpha(Mathf.clamp(warmup / warmupDuration));
|
Draw.alpha(Mathf.clamp(warmup / warmupDuration));
|
||||||
Draw.z(Layer.effect);
|
Draw.z(Layer.effect);
|
||||||
Draw.rect(regions[(int)animation], x, y);
|
Draw.rect(regions[Math.min((int)animation, regions.length - 1)], x, y);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
|
||||||
Drawf.light(x, y, 50f + Mathf.absin(5f, 5f), Pal.lightFlame, 0.6f * Mathf.clamp(warmup / warmupDuration));
|
Drawf.light(x, y, 50f + Mathf.absin(5f, 5f), Pal.lightFlame, 0.6f * Mathf.clamp(warmup / warmupDuration));
|
||||||
|
|||||||
Reference in New Issue
Block a user