diff --git a/src/main/room/controls/DOMConsoleControls.js b/src/main/room/controls/DOMConsoleControls.js index e721bdd..c746ccb 100644 --- a/src/main/room/controls/DOMConsoleControls.js +++ b/src/main/room/controls/DOMConsoleControls.js @@ -270,7 +270,7 @@ jt.DOMConsoleControls = function(room, keyForwardControls) { // Then other controls if (room.netController) - room.netController.processLocalControlState(control, press); + room.netController.processControlState(control, press); else consoleControlsSocket.controlStateChanged(control, press); } @@ -278,7 +278,7 @@ jt.DOMConsoleControls = function(room, keyForwardControls) { function processControlValue(control, value) { if (room.netController) - room.netController.processLocalControlValue(control, value); + room.netController.processControlValue(control, value); else consoleControlsSocket.controlValueChanged(control, value); } diff --git a/src/main/room/controls/DOMPeripheralControls.js b/src/main/room/controls/DOMPeripheralControls.js index e093bfe..210f7ce 100644 --- a/src/main/room/controls/DOMPeripheralControls.js +++ b/src/main/room/controls/DOMPeripheralControls.js @@ -48,7 +48,7 @@ jt.DOMPeripheralControls = function(room) { this.controlActivated = function(control, altPower, secPort) { // Never secPort // Check for NetPlay blocked controls - if (room.netController && !room.netController.processCheckLocalPeripheralControl(control)) return; + if (room.netController && !room.netController.processCheckPeripheralControl(control)) return; // All controls are Press-only and repeatable switch(control) { diff --git a/src/main/room/netplay/NetClient.js b/src/main/room/netplay/NetClient.js index fcbc925..17bf756 100644 --- a/src/main/room/netplay/NetClient.js +++ b/src/main/room/netplay/NetClient.js @@ -70,7 +70,7 @@ jt.NetClient = function(room) { // Client gets clocks from Server at onServerNetUpdate() }; - this.processLocalControlState = function (control, press) { + this.processControlState = function (control, press) { // Reject controls not available to NetPlay Clients if (disabledControls.has(control)) return room.showOSD("Function not available in NetPlay Client mode", true, true); @@ -79,12 +79,12 @@ jt.NetClient = function(room) { controlsToSend.push((control << 4) | press ); // binary encoded, always < 16000 }; - this.processLocalControlValue = function (control, value) { + this.processControlValue = function (control, value) { // Store change to be sent only to Server, do not process locally controlsToSend.push(control + (value + 10)); // always > 16000 }; - this.processCheckLocalPeripheralControl = function (control) { + this.processCheckPeripheralControl = function (control) { // Reject controls not available to NetPlay Clients if (disabledPeripheralControls.has(control)) { room.showOSD("Function not available in NetPlay Client mode", true, true); diff --git a/src/main/room/netplay/NetServer.js b/src/main/room/netplay/NetServer.js index 4013f00..473a3b2 100644 --- a/src/main/room/netplay/NetServer.js +++ b/src/main/room/netplay/NetServer.js @@ -100,7 +100,7 @@ jt.NetServer = function(room) { atariConsole.videoClockPulseApplyPulldowns(videoPulls); }; - this.processLocalControlState = function (control, press) { + this.processControlState = function (control, press) { consoleControlsSocket.controlStateChanged(control, press); // Store changes to be sent to Clients @@ -108,14 +108,14 @@ jt.NetServer = function(room) { controlsToSend.push((control << 4) | press ); // binary encoded, always < 16000 }; - this.processLocalControlValue = function (control, value) { + this.processControlValue = function (control, value) { consoleControlsSocket.controlValueChanged(control, value); // Store changes to be sent to Clients controlsToSend.push(control + (value + 10)); // always > 16000 }; - this.processCheckLocalPeripheralControl = function (control) { + this.processCheckPeripheralControl = function (control) { // All controls allowed return true; }; @@ -277,13 +277,13 @@ jt.NetServer = function(room) { function onClientNetUpdate(netUpdate) { if (!netUpdate.c) return; - // Apply changes as if they were local controls + // Process changes as if they were local controls for (var i = 0, changes = netUpdate.c, len = changes.length; i < len; ++i) { var change = changes[i]; if (change < 16000) - self.processLocalControlState(change >> 4, change & 0x01); // binary encoded + self.processControlState(change >> 4, change & 0x01); // binary encoded else - self.processLocalControlValue(change & ~0x3fff, (change & 0x3fff) - 10); + self.processControlValue(change & ~0x3fff, (change & 0x3fff) - 10); } }