1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-21 21:38:29 +03:00

Better splash damage handling for small radii

This commit is contained in:
Anuken 2021-02-18 15:02:09 -05:00
parent a81b5778a0
commit 06b8dd61c7
2 changed files with 3 additions and 4 deletions

View File

@ -138,7 +138,7 @@ public class UnitTypes implements ContentList{
collides = true;
collidesTiles = true;
splashDamageRadius = 28f;
splashDamage = 54f;
splashDamage = 52f;
backColor = Pal.bulletYellowBack;
frontColor = Pal.bulletYellow;
}};

View File

@ -363,8 +363,7 @@ public class Damage{
if(ground){
if(!complete){
//increase damage slightly to compensate for new algorithm
tileDamage(team, World.toTile(x), World.toTile(y), radius / tilesize, damage * 1.1f);
tileDamage(team, World.toTile(x), World.toTile(y), radius / tilesize, damage);
}else{
completeDamage(team, x, y, radius, damage);
}
@ -381,7 +380,7 @@ public class Damage{
//this needs to be compensated
if(in != null && in.team != team && in.block.size > 1 && in.health > damage){
//deal the damage of an entire side + 1, to be equivalent with maximum 'standard' damage
in.damage(damage * (in.block.size + 1));
in.damage(damage * Math.min((in.block.size + 1), baseRadius * 0.44f));
//no need to continue with the explosion
return;
}