From ad3fbdd1cb501bc22dc2695c7f27e3003a963ce8 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 30 Dec 2017 12:44:28 +0100 Subject: [PATCH] fix inheritence for sockets --- src/game-lib-socket-cast.js | 6 +----- src/game-lib-socket-receive.js | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/game-lib-socket-cast.js b/src/game-lib-socket-cast.js index 1452aaa..43f6aa5 100644 --- a/src/game-lib-socket-cast.js +++ b/src/game-lib-socket-cast.js @@ -18,10 +18,6 @@ GameLib.Socket.Cast = function( }; } - if (apiSocketCast instanceof GameLib.Socket.Cast) { - return apiSocketCast; - } - GameLib.API.Socket.Cast.call( this, apiSocketCast, @@ -37,7 +33,7 @@ GameLib.Socket.Cast = function( ); }; -GameLib.Socket.Cast.prototype = Object.create(GameLib.API.Socket.Cast.prototype); +GameLib.Socket.Cast.prototype = Object.create(GameLib.Socket.prototype); GameLib.Socket.Cast.prototype.constructor = GameLib.Socket.Cast; GameLib.Socket.Cast.prototype.createInstance = function() { diff --git a/src/game-lib-socket-receive.js b/src/game-lib-socket-receive.js index d8b6b51..c0fc5a9 100644 --- a/src/game-lib-socket-receive.js +++ b/src/game-lib-socket-receive.js @@ -18,10 +18,6 @@ GameLib.Socket.Receive = function( }; } - if (apiSocketReceive instanceof GameLib.Socket.Receive) { - return apiSocketReceive; - } - GameLib.API.Socket.Receive.call( this, apiSocketReceive, @@ -38,7 +34,7 @@ GameLib.Socket.Receive = function( }; -GameLib.Socket.Receive.prototype = Object.create(GameLib.API.Socket.Receive.prototype); +GameLib.Socket.Receive.prototype = Object.create(GameLib.Socket.prototype); GameLib.Socket.Receive.prototype.constructor = GameLib.Socket.Receive; GameLib.Socket.Receive.prototype.createInstance = function() {