Fix issue with capturing enemy buildings in 'Intervention' mission
The onDamaged event handler would still fire after an enemy building had been captured. Fixed by checking the owner before starting repairs. Thanks to Microbit for showing me that people actually did that.
This commit is contained in:
@@ -188,7 +188,9 @@ SetupWorld = function()
|
||||
Utils.Do(Actor.ActorsWithTrait("RepairableBuilding"), function(building)
|
||||
if Actor.Owner(building) == soviets then
|
||||
Actor.OnDamaged(building, function(b)
|
||||
Actor.RepairBuilding(b)
|
||||
if Actor.Owner(b) == soviets then
|
||||
Actor.RepairBuilding(b)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user