Fixed #4121
This commit is contained in:
@@ -317,7 +317,11 @@ public class TypeIO{
|
|||||||
return player;
|
return player;
|
||||||
}else if(type == 1){ //formation controller
|
}else if(type == 1){ //formation controller
|
||||||
int id = read.i();
|
int id = read.i();
|
||||||
return prev instanceof FormationAI ? prev : new FormationAI(Groups.unit.getByID(id), null);
|
if(prev instanceof FormationAI f){
|
||||||
|
f.leader = Groups.unit.getByID(id);
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
return new FormationAI(Groups.unit.getByID(id), null);
|
||||||
}else if(type == 3){
|
}else if(type == 3){
|
||||||
int pos = read.i();
|
int pos = read.i();
|
||||||
if(prev instanceof LogicAI pai){
|
if(prev instanceof LogicAI pai){
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class NuclearReactor extends PowerGenerator{
|
|||||||
float smoke = 1.0f + (heat - smokeThreshold) / (1f - smokeThreshold); //ranges from 1.0 to 2.0
|
float smoke = 1.0f + (heat - smokeThreshold) / (1f - smokeThreshold); //ranges from 1.0 to 2.0
|
||||||
if(Mathf.chance(smoke / 20.0 * delta())){
|
if(Mathf.chance(smoke / 20.0 * delta())){
|
||||||
Fx.reactorsmoke.at(x + Mathf.range(size * tilesize / 2f),
|
Fx.reactorsmoke.at(x + Mathf.range(size * tilesize / 2f),
|
||||||
y + Mathf.random(size * tilesize / 2f));
|
y + Mathf.range(size * tilesize / 2f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user