From 937b16a9efebcc394c27cc8304c36176dade3897 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 23 Mar 2018 17:25:48 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 81 bytes modified --- 21g30t1e75.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/21g30t1e75.js b/21g30t1e75.js index 3cdab11..d953f3b 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -1273,16 +1273,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) { var backup = null; var temp = null; var advanced = false; - - if (this.state.overrideOrientation) { - this.backupPreviousOrientation = this.backupOrientation; - - this.backupOrientation = this.state.orientation; - - this.state.overrideOrientation = false; - } - this.snake.map( function(body, index) { @@ -1345,6 +1336,10 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) { } else { + if (this.state.overrideOrientation) { + this.backupPreviousOrientation = this.state.orientation; + } + var gameObject = this.grid[body.position.x][body.position.y]; switch (gameObject.objectType) {