Multiblock damage calculation bugfix

This commit is contained in:
Anuken
2020-12-18 14:56:14 -05:00
parent 6783069f95
commit 8d43590657
2 changed files with 8 additions and 9 deletions
+3 -4
View File
@@ -389,11 +389,10 @@ public class Damage{
if(scaledDamage <= 0 || tile == null) continue;
//apply damage to entity if needed
if(tile.build != null && tile.team() != team){
int health = (int)tile.build.health();
if(tile.build.health() > 0){
if(tile.build != null && tile.build.team != team){
if(tile.build.health > 0){
tile.build.damage(scaledDamage);
scaledDamage -= health;
scaledDamage -= (int)(tile.build.health / (tile.block().size * tile.block().size));
if(scaledDamage <= 0) continue;
}