Skip to content

Commit 08fff0b

Browse files
committed
Fixed Eruptor.lua error
1 parent a3cac0d commit 08fff0b

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

Data/Browncoats.rte/Devices/Shields/Eruptor/Eruptor.lua

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ function Create(self)
2121
self.equippedInMainHand = false;
2222
self:SetOneHanded(true);
2323
local rootParent = self:GetRootParent();
24-
if IsAHuman(rootParent) then
25-
if ToAHuman(rootParent).EquippedItem and ToAHuman(rootParent).EquippedItem.UniqueID == self.UniqueID then
26-
ToAHuman(rootParent):UnequipBGArm();
27-
self.equippedInMainHand = true;
28-
self:SetOneHanded(false);
29-
end
24+
if IsAHuman(rootParent) and ToAHuman(rootParent).EquippedItem and ToAHuman(rootParent).EquippedItem.UniqueID == self.UniqueID then
25+
ToAHuman(rootParent):UnequipBGArm();
26+
self.equippedInMainHand = true;
27+
self:SetOneHanded(false);
3028
end
3129
end
3230

@@ -36,12 +34,10 @@ function OnAttach(self, newParent)
3634
self.Bashing = false;
3735
self.bashActive = false;
3836
self.HitsMOs = false local rootParent = self:GetRootParent();
39-
if IsAHuman(rootParent) then
40-
if ToAHuman(rootParent).EquippedItem.UniqueID == self.UniqueID then
41-
ToAHuman(rootParent):UnequipBGArm();
42-
self.equippedInMainHand = true;
43-
self:SetOneHanded(false);
44-
end
37+
if IsAHuman(rootParent) and ToAHuman(rootParent).EquippedItem and ToAHuman(rootParent).EquippedItem.UniqueID == self.UniqueID then
38+
ToAHuman(rootParent):UnequipBGArm();
39+
self.equippedInMainHand = true;
40+
self:SetOneHanded(false);
4541
end
4642
end
4743

@@ -104,6 +100,7 @@ function ThreadedUpdate(self)
104100
if not self.bashActive then
105101
self.bashActive = true;
106102
end
103+
107104
self.StanceOffset = self.bashActiveStanceOffset;
108105
self.SharpStanceOffset = self.bashActiveStanceOffset;
109106
end
@@ -146,6 +143,5 @@ function SyncedUpdate(self)
146143
end
147144
end
148145
end
149-
150146
end
151147
end

0 commit comments

Comments
 (0)