From 06b8dd61c7ce77e8af1e9d71efcda24bee842e1e Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 18 Feb 2021 15:02:09 -0500 Subject: [PATCH] Better splash damage handling for small radii --- core/src/mindustry/content/UnitTypes.java | 2 +- core/src/mindustry/entities/Damage.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index b7c5062164..a070550c4c 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -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; }}; diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index df4e5c3a35..69c16a8f50 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -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; }