Fixed nuclear reactor not exploding properly

This commit is contained in:
Anuken
2019-04-13 17:45:53 -04:00
parent 392dcf3092
commit 7a2a6586be
3 changed files with 9 additions and 8 deletions

View File

@@ -224,10 +224,12 @@ public class Damage{
//apply damage to entity if needed
if(tile.entity != null && tile.getTeam() != team){
int health = (int)tile.entity.health;
tile.entity.damage(scaledDamage);
scaledDamage -= health;
if(tile.entity.health > 0){
tile.entity.damage(scaledDamage);
scaledDamage -= health;
if(scaledDamage <= 0) continue;
if(scaledDamage <= 0) continue;
}
}
for(Point2 p : Geometry.d4){