Disable damage on spectators (e.g. pain fields)

This commit is contained in:
Mazo 2020-07-15 23:43:32 +01:00 committed by Jakob Gillich
parent 8228760b43
commit 449c727be7

View file

@ -645,7 +645,7 @@ class PlayerControl(player: Player) extends Actor with JammableBehavior with Dam
protected def TakesDamage: Receive = {
case Vitality.Damage(applyDamageTo) =>
if (player.isAlive) {
if (player.isAlive && !player.spectator) {
val originalHealth = player.Health
val originalArmor = player.Armor
val originalStamina = player.Stamina