Преглед на файлове

[lua] Ensure clipper.clipEnd() is called appropriately. See #1694

Mario Zechner преди 4 години
родител
ревизия
3f735ed0be
променени са 2 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 3 0
      spine-love/spine-love/spine.lua
  2. 2 0
      spine-solar2d/spine-solar2d/spine.lua

+ 3 - 0
spine-love/spine-love/spine.lua

@@ -352,6 +352,9 @@ function SkeletonRenderer:draw (skeleton)
 			elseif attachment.type == spine.AttachmentType.clipping then
 				self.clipper:clipStart(slot, attachment)
 				break -- continues for loop
+			else
+				self.clipper:clipEnd(slot)
+				break -- continues for loop
 			end
 
 			if texture then

+ 2 - 0
spine-solar2d/spine-solar2d/spine.lua

@@ -227,6 +227,8 @@ function spine.Skeleton:updateWorldTransform()
 				end
 				if not isClippingAttachment then self.clipper:clipEnd(slot) end
 			end
+		else
+			self.clipper:clipEnd(slot)
 		end
 	end