Skip to content

Instantly share code, notes, and snippets.

@Shchvova
Last active June 5, 2016 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shchvova/b8e9f73a4020cebacb4556191cebcdbf to your computer and use it in GitHub Desktop.
Save Shchvova/b8e9f73a4020cebacb4556191cebcdbf to your computer and use it in GitHub Desktop.
diff --git a/spine-lua/Animation.lua b/spine-lua/Animation.lua
index 8b4cc42..f4613c1 100644
--- a/spine-lua/Animation.lua
+++ b/spine-lua/Animation.lua
@@ -653,8 +653,8 @@ function Animation.FfdTimeline.new ()
end
else
for i = 1, vertexCount do
- local prev = prevVertices[i]
- vertices[i] = prev + (nextVertices[i] - prev) * percent
+ local prev = (prevVertices[i] or 0)
+ vertices[i] = prev + ((nextVertices[i] or 0) - prev) * percent
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment