This commit is contained in:
Anuken
2020-12-20 09:47:45 -05:00
parent f9fe396d1f
commit 4f683cac8b
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -126,6 +126,8 @@ public class Damage{
boolean collide = tile != null && collidedBlocks.add(tile.pos());
if(hitter.damage > 0){
float health = !collide ? 0 : tile.health;
if(collide && tile.team != team && tile.collide(hitter)){
tile.collision(hitter);
hitter.type.hit(hitter, tile.x, tile.y);
@@ -133,7 +135,7 @@ public class Damage{
//try to heal the tile
if(collide && hitter.type.testCollision(hitter, tile)){
hitter.type.hitTile(hitter, tile, tile.health, false);
hitter.type.hitTile(hitter, tile, health, false);
}
}
};