Instant ARR fix on grids not 10-wide

This commit is contained in:
Ishaan Bhardwaj 2021-01-23 11:35:07 -05:00
parent 8e7a5418dc
commit 450833b246

View File

@ -166,9 +166,9 @@ function Ruleset:movePiece(piece, grid, move, instant)
elseif move == "right" then elseif move == "right" then
piece:moveInGrid({x=1, y=0}, 1, grid, false) piece:moveInGrid({x=1, y=0}, 1, grid, false)
elseif move == "speedleft" then elseif move == "speedleft" then
piece:moveInGrid({x=-1, y=0}, 10, grid, instant) piece:moveInGrid({x=-1, y=0}, grid.width, grid, instant)
elseif move == "speedright" then elseif move == "speedright" then
piece:moveInGrid({x=1, y=0}, 10, grid, instant) piece:moveInGrid({x=1, y=0}, grid.width, grid, instant)
end end
if piece.position.x ~= x then if piece.position.x ~= x then
self:onPieceMove(piece, grid) self:onPieceMove(piece, grid)