Add some traces to understand what happens with connection indicator
authorBenjamin Auder <benjamin.auder@somewhere>
Sun, 22 Mar 2020 13:22:43 +0000 (14:22 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sun, 22 Mar 2020 13:22:43 +0000 (14:22 +0100)
client/src/views/Game.vue

index f7e5549..f1521e6 100644 (file)
@@ -456,6 +456,7 @@ export default {
           });
           break;
         case "connect":
+          console.log("connect " + data.from + " " + !!this.people[data.from]);
           if (!this.people[data.from]) {
             this.people[data.from] = { focus: true };
             this.newConnect[data.from] = true; //for self multi-connects tests
@@ -463,9 +464,11 @@ export default {
           }
           break;
         case "disconnect":
+          console.log("disconnect " + data.from);
           this.$delete(this.people, data.from);
           break;
         case "getfocus": {
+          console.log("get focus " + data.from + " " + !!this.people[data.from]);
           let player = this.people[data.from];
           if (!!player) {
             player.focus = true;
@@ -474,6 +477,7 @@ export default {
           break;
         }
         case "losefocus": {
+          console.log("lose focus " + data.from + " " + !!this.people[data.from]);
           let player = this.people[data.from];
           if (!!player) {
             player.focus = false;