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)){
|
if(Float.isNaN(amount)){
|
||||||
amount = 0f;
|
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();
|
short amount = stream.readShort();
|
||||||
for(int i = 0; i < amount; i++){
|
for(int i = 0; i < amount; i++){
|
||||||
|
|||||||
Reference in New Issue
Block a user