updated vector comparison
Co-authored-by: Chr1Z <97286811+Chr1Z93@users.noreply.github.com>
This commit is contained in:
parent
a9c31630f0
commit
59f64415d4
@ -1185,12 +1185,10 @@ function modifySlot(newSlot, cardPosition)
|
||||
table.insert(slotSnaps, snap)
|
||||
end
|
||||
end
|
||||
cardPosition.x = tonumber(string.format("%.3f", cardPosition.x))
|
||||
cardPosition.z = tonumber(string.format("%.3f", cardPosition.z))
|
||||
cardPosition.y = 0
|
||||
for snapId, snap in ipairs(slotSnaps) do
|
||||
local snapPosX = tonumber(string.format("%.3f", snap.position.x))
|
||||
local snapPosZ = tonumber(string.format("%.3f", snap.position.z))
|
||||
if snapPosX == cardPosition.x and snapPosZ == cardPosition.z then
|
||||
local snapPosition = Vector(snap.position.x, 0, snap.position.z)
|
||||
if snapPosition == cardPosition then
|
||||
slotData[snapId] = newSlot
|
||||
if Player[playerColor].seated then
|
||||
printToColor(newSlot .. " slot added to player mat", playerColor, Color.fromString(playerColor))
|
||||
|
Loading…
Reference in New Issue
Block a user