added error catching

This commit is contained in:
Chr1Z93 2023-10-18 21:48:58 +02:00
parent 039488d48b
commit d6015974a6

View File

@ -272,7 +272,8 @@ function placeOrMergeIntoDeck(obj, pos, rot)
obj.use_hands = true
-- this avoids a TTS bug that merges unrelated cards that are not resting
if #searchResult == 1 then
searchResult[1].putObject(obj)
-- call this with avoiding errors (physics is sometimes too fast so the object doesn't exist for the put)
pcall(function() searchResult[1].putObject(obj) end)
end
end,
function() return not obj.isSmoothMoving() end, 3)