Skip to content

Commit

Permalink
Fix UEF factory arms
Browse files Browse the repository at this point in the history
When factory was paused and unit queued for construction. Unpausing the
factory caused creating two threads for moving arms.
  • Loading branch information
speed2 authored and shalkya committed Sep 22, 2019
1 parent 2cdfd44 commit a080a9d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/terranunits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ TAirFactoryUnit = Class(AirFactoryUnit) {
end,

StartArmsMoving = function(self)
self.ArmsThread = self:ForkThread(self.MovingArmsThread)
if not self.ArmsThread then
self.ArmsThread = self:ForkThread(self.MovingArmsThread)
end
end,

MovingArmsThread = function(self)
Expand Down Expand Up @@ -276,7 +278,9 @@ TSeaFactoryUnit = Class(SeaFactoryUnit) {
end,

StartArmsMoving = function(self)
self.ArmsThread = self:ForkThread(self.MovingArmsThread)
if not self.ArmsThread then
self.ArmsThread = self:ForkThread(self.MovingArmsThread)
end
end,

MovingArmsThread = function(self)
Expand Down

0 comments on commit a080a9d

Please sign in to comment.