[lua] Fixed bug in Slot, attachment vertices didn't get cleared upon Slot:setAttachment call

This commit is contained in:
badlogic 2017-05-02 14:02:55 +02:00
parent 676b740269
commit 755425d4be

View File

@ -46,8 +46,7 @@ function Slot.new (data, bone)
darkColor = nil,
attachment = nil,
attachmentTime = 0,
attachmentVertices = {},
attachmentVerticesCount = 0
attachmentVertices = {}
}
setmetatable(self, Slot)
@ -62,7 +61,7 @@ function Slot:setAttachment (attachment)
if self.attachment == attachment then return end
self.attachment = attachment
self.attachmentTime = self.bone.skeleton.time
self.attachmentVerticesCount = 0
self.attachmentVertices = {};
end
function Slot:setAttachmentTime (time)