mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-03 03:31:28 +03:00
Negative power values will be fixed by reloading the map (#335)
This commit is contained in:
@@ -28,6 +28,10 @@ public class PowerModule extends BlockModule{
|
||||
if(Float.isNaN(amount)){
|
||||
amount = 0f;
|
||||
}
|
||||
// Workaround: If power went negative for some reason, at least fix it when reloading the map
|
||||
if(amount < 0f){
|
||||
amount = 0f;
|
||||
}
|
||||
|
||||
short amount = stream.readShort();
|
||||
for(int i = 0; i < amount; i++){
|
||||
|
||||
Reference in New Issue
Block a user