From 192b74231a8386a401a7d6a7557bc52d7254cbd3 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Thu, 15 Mar 2018 11:55:26 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 264 bytes modified --- 21g30t1e75.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/21g30t1e75.js b/21g30t1e75.js index 8f309fe..4cf8a88 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -231,8 +231,6 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) { ); } else { - - var temp = { x : body.position.x, @@ -265,6 +263,15 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) { } else { + if (body.bodyType === GameLib.CustomCode.BODY_TYPE_CORNER) { + body.mesh.geometry = null; + body.mesh.materials = null; + body.mesh.remove(); + body.mesh = body.backupMesh; + body.mesh.visible = true; + body.mesh.updateInstance('visible'); + } + body.bodyType = backup.bodyType; }