Removed DamageSoundType and replaced it with a string "tag" instead to allow mod creators to create custom damage sounds
Fixed damagemodifier sounds being completely ignored due to a variable misname Added structure damage possibility for melee weapons so you can break down windows with a crowbar in spectacular fashion (it's clearly a very inferior method to plasma cutters though) Clown hitsounds are in now which is awesome. Beat up some clowns!
This commit is contained in:
@@ -1000,7 +1000,7 @@ namespace Barotrauma
|
||||
{
|
||||
target.AddDamage(CauseOfDeath.Bloodloss, 1.0f, character);
|
||||
#if CLIENT
|
||||
SoundPlayer.PlayDamageSound(DamageSoundType.LimbBlunt, 25.0f, targetTorso.body);
|
||||
SoundPlayer.PlayDamageSound("LimbBlunt", 25.0f, targetTorso.body);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
||||
@@ -49,8 +49,8 @@ namespace Barotrauma
|
||||
|
||||
|
||||
#if CLIENT
|
||||
[Serialize(DamageSoundType.None, false)]
|
||||
public DamageSoundType DamageSoundType
|
||||
[Serialize("", false)]
|
||||
public string DamageSound
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
|
||||
@@ -372,13 +372,13 @@ namespace Barotrauma
|
||||
#if CLIENT
|
||||
if (playSound)
|
||||
{
|
||||
DamageSoundType damageSoundType = (damageType == DamageType.Blunt) ? DamageSoundType.LimbBlunt : DamageSoundType.LimbSlash;
|
||||
string damageSoundType = (damageType == DamageType.Blunt) ? "LimbBlunt" : "LimbSlash";
|
||||
|
||||
foreach (DamageModifier damageModifier in appliedDamageModifiers)
|
||||
{
|
||||
if (damageModifier.DamageSoundType != DamageSoundType.None)
|
||||
if (!string.IsNullOrWhiteSpace(damageModifier.DamageSound))
|
||||
{
|
||||
damageSoundType = damageModifier.DamageSoundType;
|
||||
damageSoundType = damageModifier.DamageSound;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user