Skip to content

Commit 676674f

Browse files
authored
reset p1 and p2 to null after 2nd click
maybe it will make it register p1 for every odd clicks and p2 for every even clicks
1 parent 1eb4ab9 commit 676674f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/playerCommands.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ export const commands = commandList({
201201
if(args.action) outputFail(`There is no recorded history for the selected region matching the provided filters.`);
202202
else outputFail(`There is no recorded history for the selected region.`);
203203
}
204-
if(limitTiles == amount)
205-
output(`Displaying first ${limitTiles} entries. To show other entries, increase the limit or select a smaller area.`);
204+
if(limitTiles == amount){
205+
output(`Displaying first ${limitTiles} entries. To show other entries, increase the limit or select a smaller area.`)
206+
}
206207
}
207208
const p1 = cachedPointMap[sender.uuid];
208209
if(!p1){
@@ -215,6 +216,8 @@ export const commands = commandList({
215216
const height = Math.abs(p1[1] - p2[1]);
216217
if(width > 50 || height > 50) fail("Selection too large: width/height cannot be more than 50.");
217218
handleArea(p1, p2);
219+
p1 = null;
220+
p2 = null;
218221
if(!args.persist) handleTaps("off");
219222
}
220223
},

0 commit comments

Comments
 (0)