diff --git a/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/Items.xml b/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/Items.xml
new file mode 100644
index 000000000..198360c80
--- /dev/null
+++ b/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/Items.xml
@@ -0,0 +1,154 @@
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/RespawnSuit.png b/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/RespawnSuit.png
new file mode 100644
index 000000000..d1eb92b17
Binary files /dev/null and b/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/RespawnSuit.png differ
diff --git a/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/TestCamel.sub b/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/TestCamel.sub
new file mode 100644
index 000000000..e3a74b1bb
Binary files /dev/null and b/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/TestCamel.sub differ
diff --git a/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/filelist.xml b/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/filelist.xml
new file mode 100644
index 000000000..ef018cc6c
--- /dev/null
+++ b/Barotrauma/BarotraumaShared/LocalMods/[DebugOnlyTest]ExplosionTest/filelist.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
index 6fcd7a33b..9646eb0cb 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
@@ -4543,12 +4543,12 @@ namespace Barotrauma
}
}
- public AttackResult AddDamage(Vector2 worldPosition, IEnumerable afflictions, float stun, bool playSound, Vector2? attackImpulse = null, Character attacker = null, float damageMultiplier = 1f)
+ public AttackResult AddDamage(Vector2 worldPosition, IEnumerable afflictions, float stun, bool playSound, Vector2? attackImpulse = null, Character attacker = null, float damageMultiplier = 1f, float penetration = 0f)
{
- return AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse ?? Vector2.Zero, out _, attacker, damageMultiplier: damageMultiplier);
+ return AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse ?? Vector2.Zero, out _, attacker, damageMultiplier: damageMultiplier,penetration: penetration);
}
- public AttackResult AddDamage(Vector2 worldPosition, IEnumerable afflictions, float stun, bool playSound, Vector2 attackImpulse, out Limb hitLimb, Character attacker = null, float damageMultiplier = 1)
+ public AttackResult AddDamage(Vector2 worldPosition, IEnumerable afflictions, float stun, bool playSound, Vector2 attackImpulse, out Limb hitLimb, Character attacker = null, float damageMultiplier = 1f, float penetration = 0f)
{
hitLimb = null;
@@ -4565,7 +4565,7 @@ namespace Barotrauma
}
}
- return DamageLimb(worldPosition, hitLimb, afflictions, stun, playSound, attackImpulse, attacker, damageMultiplier);
+ return DamageLimb(worldPosition, hitLimb, afflictions, stun, playSound, attackImpulse, attacker, damageMultiplier,penetration: penetration);
}
public void RecordKill(Character target)
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Explosion.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Explosion.cs
index 5c11eebb7..c88c2a5ce 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Map/Explosion.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Explosion.cs
@@ -589,7 +589,7 @@ namespace Barotrauma
//only play the damage sound on the closest limb (playing it on all just sounds like a mess)
bool playSound = PlayDamageSounds && limb == closestLimb;
- AttackResult attackResult = c.AddDamage(hitPos, modifiedAfflictions, attack.Stun * distFactor, playSound: playSound, attacker: attacker, damageMultiplier: attack.DamageMultiplier * attackData.DamageMultiplier);
+ AttackResult attackResult = c.AddDamage(hitPos, modifiedAfflictions, attack.Stun * distFactor, playSound: playSound, attacker: attacker, damageMultiplier: attack.DamageMultiplier * attackData.DamageMultiplier,penetration: attack.Penetration * distFactor);
damages.Add(limb, attackResult.Damage);
}
}
@@ -657,7 +657,6 @@ namespace Barotrauma
bool createWallDamageProjectiles = false,
bool distanceFalloff = true)
{
- float dist = 600.0f;
damagedStructures.Clear();
foreach (Structure structure in Structure.WallList)
{
@@ -665,7 +664,7 @@ namespace Barotrauma
if (structure.HasBody &&
!structure.IsPlatform &&
- Vector2.Distance(structure.WorldPosition, worldPosition) < dist * 3.0f)
+ Vector2.Distance(structure.WorldPosition, worldPosition) < worldRange)
{
for (int i = 0; i < structure.SectionCount; i++)
{