diff --git a/21g30t1e75.js b/21g30t1e75.js index ee58f5f..bec89ae 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -70,7 +70,7 @@ this.advanceTime = 0; this.state = { orientation : 0, turning : false, - flip : false + flip : 0 }; GameLib.CustomCode.prototype.createMaterial = function(image) { @@ -159,7 +159,7 @@ GameLib.CustomCode.SnakeBody = function( this.orientation = orientation; if (GameLib.Utils.UndefinedOrNull(flip)) { - flip = false; + flip = 0; } this.flip = flip; @@ -202,8 +202,8 @@ GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function(flip) { this.mesh.rotation.z = this.orientation * Math.PI / 2; - if (this.backupMesh && flip) { - this.mesh.rotation.z += Math.PI / 2; + if (this.backupMesh) { + this.mesh.rotation.z += ((Math.PI / 2) * flip); } /**