feature/authoritative-server #1

Merged
para merged 6 commits from feature/authoritative-server into master 2020-11-17 21:39:26 +00:00
Showing only changes of commit dad92aef4a - Show all commits

View file

@ -179,13 +179,6 @@ const setTilesOwner = (gameId, tileIdxs, owner) => {
}
}
function pointInBounds(pt, rect) {
return pt.x >= rect.x
&& pt.x <= rect.x + rect.w
&& pt.y >= rect.y
&& pt.y <= rect.y + rect.h
}
// get all grouped tiles for a tile
function getGroupedTileIdxs(gameId, tileIdx) {
const tiles = GAMES[gameId].puzzle.tiles
@ -224,7 +217,7 @@ const freeTileIdxByPos = (gameId, pos) => {
w: info.tileSize,
h: info.tileSize,
}
if (pointInBounds(pos, collisionRect)) {
if (Geometry.pointInBounds(pos, collisionRect)) {
if (maxZ === -1 || tile.z > maxZ) {
maxZ = tile.z
tileIdx = idx