Improved revolver hitreg, shooting structures affects karma, fixed 5th server being blocked in server list

Closes #70
This commit is contained in:
juanjp600
2017-12-04 12:39:27 -03:00
parent 6841bb154b
commit 2347f2937e
7 changed files with 72 additions and 12 deletions
@@ -1524,7 +1524,7 @@ namespace Barotrauma
speechBubbleColor = color;
}
public virtual void AddDamage(CauseOfDeath causeOfDeath, float amount, IDamageable attacker)
private void AdjustKarma(IDamageable attacker,float amount)
{
if (GameMain.Server != null)
{
@@ -1546,7 +1546,10 @@ namespace Barotrauma
}
}
}
}
public virtual void AddDamage(CauseOfDeath causeOfDeath, float amount, IDamageable attacker)
{
Health = health-amount;
if (amount > 0.0f)
{
@@ -1554,6 +1557,7 @@ namespace Barotrauma
DamageHUD(amount);
}
AdjustKarma(attacker, amount);
if (health <= minHealth) Kill(causeOfDeath);
}
partial void DamageHUD(float amount);