Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 8 bytes modified

beta.r3js.org
-=yb4f310 2018-03-22 19:23:28 +01:00
parent e42c8bf21b
commit 2fff3a0272
1 changed files with 12 additions and 13 deletions

View File

@ -967,29 +967,28 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
* Update the grid with our new body * Update the grid with our new body
*/ */
this.grid[body.position.x][body.position.y] = body; this.grid[body.position.x][body.position.y] = body;
}
if (body.backupMesh) { if (body.backupMesh) {
/** /**
* We used to be a corner, change back * We used to be a corner, change back
* @type {null} * @type {null}
*/ */
body.mesh.geometry = null; body.mesh.geometry = null;
body.mesh.materials = null; body.mesh.materials = null;
body.mesh.remove(); body.mesh.remove();
body.mesh = body.backupMesh; body.mesh = body.backupMesh;
body.backupMesh = null; body.backupMesh = null;
body.mesh.visible = true; body.mesh.visible = true;
body.mesh.updateInstance('visible'); body.mesh.updateInstance('visible');
body.mesh.updateInstance('position');
}
body.mesh.updateInstance('position');
} }
if (backup.orientation !== temp.orientation) { if (backup.orientation !== temp.orientation) {