mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-12 03:37:27 +07:00
Crash fix
This commit is contained in:
parent
a161c09441
commit
4b9bcfb014
@ -224,7 +224,7 @@ public class Saves{
|
||||
}
|
||||
|
||||
public Zone getZone(){
|
||||
return content.getByID(ContentType.zone, meta.rules.zone);
|
||||
return meta == null || meta.rules == null ? null : content.getByID(ContentType.zone, meta.rules.zone);
|
||||
}
|
||||
|
||||
public int getBuild(){
|
||||
|
@ -161,7 +161,7 @@ public class UnitFactory extends Block{
|
||||
|
||||
//player-made spawners have default behavior
|
||||
if(entity.cons.valid() || tile.isEnemyCheat()){
|
||||
entity.time += entity.delta() * entity.speedScl * Vars.state.rules.unitBuildSpeedMultiplier;
|
||||
entity.time += entity.delta() * entity.speedScl * Vars.state.rules.unitBuildSpeedMultiplier * entity.power.satisfaction;
|
||||
entity.buildTime += entity.delta() * entity.power.satisfaction * Vars.state.rules.unitBuildSpeedMultiplier;
|
||||
entity.speedScl = Mathf.lerpDelta(entity.speedScl, 1f, 0.05f);
|
||||
}else{
|
||||
@ -199,6 +199,7 @@ public class UnitFactory extends Block{
|
||||
float buildTime;
|
||||
float time;
|
||||
float speedScl;
|
||||
//TODO remove next breaking release
|
||||
float warmup; //only for enemy spawners
|
||||
int spawned;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user