Skip to content

Commit 5e97c24

Browse files
committed
refactor: change console.debug to console.log
debug doesn't seem to want to work for me so, I've reverted them to logs.
1 parent 9ae0131 commit 5e97c24

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

js/src/socket.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function connect() {
4141
function onOpen(e) {
4242
_isConnected = true;
4343
if (_SETTINGS_debug) {
44-
console.debug("_isConnected: " + _isConnected);
44+
console.log("_isConnected: " + _isConnected);
4545
}
4646

4747
// New websocket server doesn't need to recieve this
@@ -65,8 +65,8 @@ function onMessage(e) {
6565
var byteSize = e.data.length + (m ? m.length : 0);
6666

6767
if (_SETTINGS_debug) {
68-
console.debug("recieved message (" + byteSize / 1024 + " kB)");
69-
console.debug("data: " + e.data);
68+
console.log("recieved message (" + byteSize / 1024 + " kB)");
69+
console.log("data: " + e.data);
7070
}
7171

7272
var data = JSON.parse(e.data);
@@ -94,7 +94,7 @@ function onMessage(e) {
9494
} else if (data.type == "playerData") {
9595
//console.log("updating players(" + typeof(data.payload) + "): " + JSON.stringify(data.payload));
9696
var sortedPlayers = data.payload.sort(sorter);
97-
doPlayerUpdate(data.payload);
97+
doPlayerUpdate(sortedPlayers);
9898

9999
} else if (data.type == "playerLeft") {
100100
//console.log("player left:" + data.payload);
@@ -271,7 +271,7 @@ function playerLeft(playerName) {
271271

272272
playerCount = Object.keys(localCache).length;
273273
if (_SETTINGS_debug) {
274-
console.debug("Playerleft playercount: " + playerCount);
274+
console.log("Playerleft playercount: " + playerCount);
275275
}
276276
$("#player_count").text(playerCount);
277277
}
@@ -302,7 +302,7 @@ function doPlayerUpdate(players) {
302302
players.sort();
303303

304304
if (_SETTINGS_debug) {
305-
console.debug(players);
305+
console.log(players);
306306
}
307307

308308
players.forEach(function (plr) {

0 commit comments

Comments
 (0)