diff --git a/lib/classes/commands/GridCommands.ts b/lib/classes/commands/GridCommands.ts index e396097..9055114 100644 --- a/lib/classes/commands/GridCommands.ts +++ b/lib/classes/commands/GridCommands.ts @@ -111,7 +111,7 @@ export class GridCommands extends CommandsBase let found = false; filterMsg.Data.forEach((data) => { - if (data.X === (gridX / 256) && data.Y === (gridY / 256)) + if (data.X === gridX && data.Y === gridY) { found = true; } @@ -126,7 +126,7 @@ export class GridCommands extends CommandsBase const responseMsg = packet.message as MapBlockReplyMessage; responseMsg.Data.forEach((data) => { - if (data.X === (gridX / 256) && data.Y === (gridY / 256)) + if (data.X === gridX && data.Y === gridY) { response.block = new MapBlock(); response.block.name = Utils.BufferToStringSimple(data.Name); @@ -151,9 +151,9 @@ export class GridCommands extends CommandsBase RegionHandle: regionHandle }; circuit.sendMessage(mi, PacketFlags.Reliable); - const minX = Math.floor(gridX / 256) * 256; + const minX = gridX; const maxX = minX + 256; - const minY = Math.floor(gridY / 256) * 256; + const minY = gridY; const maxY = minY + 256; response.avatars = []; circuit.waitForMessage(Message.MapItemReply, 10000, (packet: Packet): FilterResponse => diff --git a/package.json b/package.json index cad621e..97d2df6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@caspertech/node-metaverse", - "version": "0.4.3", + "version": "0.4.4", "description": "A node.js interface for Second Life.", "main": "dist/index.js", "types": "dist/index.d.ts",