From db4a65dd11cfc0c366beea2ebca5451b41c60a1c Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 23 Mar 2018 14:52:16 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 35 bytes modified --- 21g30t1e75.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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)