diff options
author | John Eisenmann <esperantanaso@gmail.com> | 2020-05-15 12:13:08 -0400 |
---|---|---|
committer | John Eisenmann <esperantanaso@gmail.com> | 2020-05-15 12:13:08 -0400 |
commit | 36def2877de38ad112f3ba2093c1e3ca5d378167 (patch) | |
tree | d75e2d2f72468effdc1030af7e9a90e78521df20 | |
parent | 1e8cf3afd3e5fad8fdc07d62facf7aa635f3bd13 (diff) |
Fix logical operator typos
-rw-r--r-- | models/crack.js | 2 | ||||
-rw-r--r-- | utils/game.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/models/crack.js b/models/crack.js index 1f31212..e59ff6b 100644 --- a/models/crack.js +++ b/models/crack.js @@ -35,7 +35,7 @@ Crack.prototype.tick = function() { Crack.prototype.giveTileToPlayer = function() { var tempTile = chunkUtils.getTile(this.pos); - if (tempTile < BLOCK_START_TILE && tempTile >= BLOCK_START_TILE + BLOCK_TILE_AMOUNT) { + if (tempTile < BLOCK_START_TILE || tempTile >= BLOCK_START_TILE + BLOCK_TILE_AMOUNT) { return; } var tempPlayer = gameUtils.getPlayerByUsername(this.username); diff --git a/utils/game.js b/utils/game.js index 2d1350b..0f27dcf 100644 --- a/utils/game.js +++ b/utils/game.js @@ -404,7 +404,7 @@ function performGetEntitiesCommand(command, player, commandList) { while (true) { var tempRadius = 40; if (tempEntity.pos.x < player.pos.x - tempRadius || tempEntity.pos.x > player.pos.x + tempRadius - || tempEntity.pos.y < player.pos.y - tempRadius && tempEntity.pos.y > player.pos.y + tempRadius) { + || tempEntity.pos.y < player.pos.y - tempRadius || tempEntity.pos.y > player.pos.y + tempRadius) { break; } if (tempEntity == player) { |