Anuken/Mindustry-Suggestions/issues/1808 / Less fire in rain

This commit is contained in:
Anuken
2021-01-17 15:54:43 -05:00
parent 634d9d1a40
commit 6a63956b71
4 changed files with 18 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import mindustry.entities.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.world.*;
import mindustry.world.meta.*;
import static mindustry.Vars.*;
@@ -38,13 +39,15 @@ abstract class FireComp implements Timedc, Posc, Firec, Syncc{
control.sound.loop(Sounds.fire, this, 0.07f);
}
time = Mathf.clamp(time + Time.delta, 0, lifetime());
//faster updates -> disappears more quickly
float speedMultiplier = 1f + Math.max(state.envAttrs.get(Attribute.water) * 10f, 0);
time = Mathf.clamp(time + Time.delta * speedMultiplier, 0, lifetime);
if(Vars.net.client()){
return;
}
if(time >= lifetime() || tile == null){
if(time >= lifetime || tile == null){
remove();
return;
}