diff --git a/21g30t1e75.js b/21g30t1e75.js index 1508208..aa1af63 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -822,6 +822,15 @@ GameLib.CustomCode.SnakeBody = function( GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype); GameLib.CustomCode.SnakeBody.prototype.constructor = GameLib.CustomCode.GameObject; +GameLib.CustomCode.SnakeBody.prototype.dispose = function() { + GameLib.CustomCode.GameObject.prototype.dispose.call(this); + if (this.backupMesh) { + this.backupMesh.geometry = null; + this.backupMesh.materials = null; + this.backupMesh.remove(); + } +} + GameLib.CustomCode.SnakeBody.prototype.clone = function() { return new GameLib.CustomCode.SnakeBody( this.type,