mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-05 13:08:20 +07:00
Fixed #4033
This commit is contained in:
parent
9d9cbdffd5
commit
0dd3c2cb5a
@ -390,9 +390,10 @@ public class Damage{
|
||||
|
||||
//apply damage to entity if needed
|
||||
if(tile.build != null && tile.build.team != team){
|
||||
int health = (int)(tile.build.health / (tile.block().size * tile.block().size));
|
||||
if(tile.build.health > 0){
|
||||
tile.build.damage(scaledDamage);
|
||||
scaledDamage -= (int)(tile.build.health / (tile.block().size * tile.block().size));
|
||||
scaledDamage -= health;
|
||||
|
||||
if(scaledDamage <= 0) continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user