From 1a0a7043ddf64d099219b65bf31ad5630eb0dcf2 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 24 Mar 2018 12:05:42 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 617 bytes modified --- 21g30t1e75.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/21g30t1e75.js b/21g30t1e75.js index 2d1d249..10c4c2c 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -1232,6 +1232,24 @@ GameLib.CustomCode.prototype.restore = function() { var clone = body.clone(); if (clone.backupMesh) { + + + if (clone.orientation === GameLib.CustomCode.ORIENTATION_UP) { + clone.backupMesh.position.y -= 0.5 * GameLib.CustomCode.BODY_SCALE_Y; + } + + if (clone.orientation === GameLib.CustomCode.ORIENTATION_DOWN) { + clone.backupMesh.position.y += 0.5 * GameLib.CustomCode.BODY_SCALE_Y; + } + + if (clone.orientation === GameLib.CustomCode.ORIENTATION_LEFT) { + clone.backupMesh.position.x += 0.5 * GameLib.CustomCode.BODY_SCALE_X; + } + + if (clone.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) { + clone.backupMesh.position.x -= 0.5 * GameLib.CustomCode.BODY_SCALE_X; + } + clone.backupMesh.visible = true; clone.backupMesh.updateInstance('visible');