diff --git a/21g30t1e75.js b/21g30t1e75.js index fdb8b6f..f4459e0 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -822,19 +822,20 @@ GameLib.CustomCode.SnakeBody = function( GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype); GameLib.CustomCode.SnakeBody.prototype.constructor = GameLib.CustomCode.GameObject; -/* GameLib.CustomCode.SnakeBody.prototype.clone = function() { return new GameLib.CustomCode.SnakeBody( this.type, this.mesh, - this.position, + { + x : this.position.x, + y : this.position.y + }, this.orientation, this.flip, this.backupMesh, this.isTail ) }; -*/ GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function(updateInstance) { @@ -1128,7 +1129,7 @@ GameLib.CustomCode.prototype.createCorner = function(body, temp) { GameLib.CustomCode.prototype.backup = function() { this.backupSnake = this.snake.map( function(body) { - return body; + return body.clone(); } ); }.bind(this)