Fix RepairBuilding not working for AI and Lua scripts

Fixes #5861
This commit is contained in:
Oliver Brakmann
2014-07-07 19:08:25 +02:00
parent b8756d9de7
commit 33b916a713
3 changed files with 7 additions and 4 deletions

View File

@@ -152,7 +152,7 @@ end
Actor.RepairBuilding = function(actor)
local rb = Actor.TraitOrDefault(actor, "RepairableBuilding")
if rb ~= nil and rb.Repairer == nil then
if rb ~= nil and not rb.RepairActive then
rb:RepairBuilding(actor, Actor.Owner(actor))
end
end