Fix sending mouse commands even if you do not have wheel
This commit is contained in:
parent
4a5286c6ed
commit
069b59862d
|
|
@ -1,14 +1,6 @@
|
||||||
export const config = {
|
export const config = {
|
||||||
serverAddresses: [
|
serverAddresses: [
|
||||||
"wss://computernewb.com/collab-vm/vm0",
|
"wss://vm.obama.wtf/"
|
||||||
"wss://computernewb.com/collab-vm/vm1",
|
|
||||||
"wss://computernewb.com/collab-vm/vm2",
|
|
||||||
"wss://computernewb.com/collab-vm/vm3",
|
|
||||||
"wss://computernewb.com/collab-vm/vm4",
|
|
||||||
"wss://computernewb.com/collab-vm/vm5",
|
|
||||||
"wss://computernewb.com/collab-vm/vm6",
|
|
||||||
"wss://computernewb.com/collab-vm/vm7",
|
|
||||||
"wss://computernewb.com/collab-vm/vm8",
|
|
||||||
],
|
],
|
||||||
chatSound: "https://computernewb.com/collab-vm/notify.ogg"
|
chatSound: "https://computernewb.com/collab-vm/notify.ogg"
|
||||||
}
|
}
|
||||||
|
|
@ -402,7 +402,8 @@ class CollabVMClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mouse(x, y, mask) {
|
mouse(x, y, mask) {
|
||||||
this.socket.send(guacutils.encode(["mouse", x, y, mask]));
|
if(turn == 0)
|
||||||
|
this.socket.send(guacutils.encode(["mouse", x, y, mask]));
|
||||||
}
|
}
|
||||||
key(keysym, down) {
|
key(keysym, down) {
|
||||||
this.socket.send(guacutils.encode(["key", keysym, down ? "1" : "0"]));
|
this.socket.send(guacutils.encode(["key", keysym, down ? "1" : "0"]));
|
||||||
|
|
@ -452,6 +453,8 @@ class CollabVMClient {
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
mouseevent(e, down) {
|
mouseevent(e, down) {
|
||||||
|
if(turn != 0) return;
|
||||||
|
|
||||||
if (down !== undefined) {switch (e.button) {
|
if (down !== undefined) {switch (e.button) {
|
||||||
case 0:
|
case 0:
|
||||||
this.mousestate.left = down;
|
this.mousestate.left = down;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user