v0.12.0.2

This commit is contained in:
Joonas Rikkonen
2021-02-10 17:08:21 +02:00
parent 5c80a59bdd
commit 694cdfee7b
353 changed files with 12897 additions and 5028 deletions
@@ -25,6 +25,7 @@ namespace Barotrauma
private readonly float screenColorRange, screenColorDuration;
private bool sparks, shockwave, flames, smoke, flash, underwaterBubble;
private bool playTinnitus;
private bool applyFireEffects;
private readonly float flashDuration;
private readonly float? flashRange;
@@ -63,6 +64,8 @@ namespace Barotrauma
underwaterBubble = element.GetAttributeBool("underwaterbubble", true);
smoke = element.GetAttributeBool("smoke", true);
playTinnitus = element.GetAttributeBool("playtinnitus", true);
applyFireEffects = element.GetAttributeBool("applyfireeffects", flames);
flash = element.GetAttributeBool("flash", true);
@@ -225,7 +228,7 @@ namespace Barotrauma
partial void ExplodeProjSpecific(Vector2 worldPosition, Hull hull);
public static void DamageCharacters(Vector2 worldPosition, Attack attack, float force, Entity damageSource, Character attacker)
private void DamageCharacters(Vector2 worldPosition, Attack attack, float force, Entity damageSource, Character attacker)
{
if (attack.Range <= 0.0f) { return; }
@@ -323,10 +326,10 @@ namespace Barotrauma
}
}
if (c == Character.Controlled && !c.IsDead)
if (c == Character.Controlled && !c.IsDead && playTinnitus)
{
Limb head = c.AnimController.GetLimb(LimbType.Head);
if (damages.TryGetValue(head, out float headDamage) && headDamage > 0.0f && distFactors.TryGetValue(head, out float headFactor))
if (head != null && damages.TryGetValue(head, out float headDamage) && headDamage > 0.0f && distFactors.TryGetValue(head, out float headFactor))
{
PlayTinnitusProjSpecific(headFactor);
}