Health, bleeding, oxygen & stun syncing, sending aim and use inputs and cursor positions to clients so other players will be able to see when someone is shooting, hitting with a wrench etc

This commit is contained in:
Regalis
2017-01-02 22:12:50 +02:00
parent 9c07038fef
commit c318e629ff
4 changed files with 172 additions and 27 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ namespace Barotrauma
AnimController.SimplePhysicsEnabled = false;
}
if (isDead || health <= 0.0f) return;
if (isDead || Health <= 0.0f) return;
if (Controlled == this || !aiController.Enabled) return;
@@ -90,7 +90,7 @@ namespace Barotrauma
{
AttackResult result = base.AddDamage(attacker, worldPosition, attack, deltaTime, playSound);
aiController.OnAttacked(attacker, (result.Damage + result.Bleeding) / Math.Max(health,1.0f));
aiController.OnAttacked(attacker, (result.Damage + result.Bleeding) / Math.Max(Health, 1.0f));
return result;
}