Fixed picking a card up while it is falling

This commit is contained in:
Chr1Z93 2024-11-21 00:20:35 +01:00
parent 2a778840b0
commit 225d9cbedb

View File

@ -2877,12 +2877,9 @@ function moveCardWithTokens(params)
Wait.condition(
function() stopTokenTransformUpdating(card) end,
function()
if card.held_by_color ~= nil then return true end
if card ~= nil and cardTokens[card] ~= nil and #cardTokens[card] ~= 0 then
updateTokenTransform(card)
local cardVelocity = card.getVelocity():magnitude()
return (card.resting and not card.isSmoothMoving()) or (cardVelocity < 0.15 and cardVelocity > 0.05)
return card.resting and not card.isSmoothMoving()
end
return true
@ -2891,10 +2888,6 @@ function moveCardWithTokens(params)
end
function storeTokenTransform(card)
if cardTokens[card] ~= nil then
stopTokenTransformUpdating(card)
end
cardTokens[card] = {}
local cardRot = card.getRotation()
for _, token in ipairs(searchLib.onObject(card, "isTileOrToken", 0.95)) do