Painfield fix (#305)

* Fix missing ObjectType on LocalBuildings, causing pain fields to stop working due to no SOI radius being set

* Fix damage logic for pain fields that don't rely on the nearest door
This commit is contained in:
Mazo 2019-12-27 16:48:55 +00:00 committed by Fate-JH
parent 83ac66a3bf
commit 73298a2e06
18 changed files with 767 additions and 767 deletions

View file

@ -37,7 +37,7 @@ class PainboxControl(painbox: Painbox) extends Actor {
//todo: REK boosting
val owner = painbox.Owner.asInstanceOf[Building]
val faction = owner.Faction
if(faction != PlanetSideEmpire.NEUTRAL && nearestDoor.Open.nonEmpty) {
if(faction != PlanetSideEmpire.NEUTRAL && (!painbox.Definition.HasNearestDoorDependency || (painbox.Definition.HasNearestDoorDependency && nearestDoor.Open.nonEmpty))) {
val events = owner.Zone.AvatarEvents
val damage = painbox.Definition.Damage
val radius = painbox.Definition.Radius * painbox.Definition.Radius