diff --git a/CookieMonster.js b/CookieMonster.js index d135402..50de44c 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -61,7 +61,6 @@ CM.Cache.InitCache = function() { * @global {number} CM.Cache.dragonAura2 The number of the second (left) Aura */ CM.Cache.CacheDragonAuras = function() { - /** @global */ CM.Cache.dragonAura = Game.dragonAura; CM.Cache.dragonAura2 = Game.dragonAura2; }; @@ -4226,12 +4225,6 @@ CM.ReplaceNative = function() { else return CM.Disp.FormatTime(time / Game.fps, 1); }; - CM.Backup.Loop = Game.Loop; - Game.Loop = function() { - CM.Backup.Loop(); - CM.Loop(); - }; - CM.Backup.Logic = Game.Logic; eval('CM.Backup.LogicMod = ' + Game.Logic.toString().split('document.title').join('CM.Cache.Title')); Game.Logic = function() { @@ -5626,6 +5619,8 @@ CM.init = function() { if (proceed) { CM.DelayInit(); Game.registerHook('draw', CM.Disp.Draw); + Game.registerHook('logic', CM.Loop); + } }; diff --git a/src/Cache.js b/src/Cache.js index 9f42b2f..91a5fd3 100644 --- a/src/Cache.js +++ b/src/Cache.js @@ -29,7 +29,6 @@ CM.Cache.InitCache = function() { * @global {number} CM.Cache.dragonAura2 The number of the second (left) Aura */ CM.Cache.CacheDragonAuras = function() { - /** @global */ CM.Cache.dragonAura = Game.dragonAura; CM.Cache.dragonAura2 = Game.dragonAura2; }; diff --git a/src/Footer.js b/src/Footer.js index e386213..59ed9c9 100644 --- a/src/Footer.js +++ b/src/Footer.js @@ -19,6 +19,8 @@ CM.init = function() { if (proceed) { CM.DelayInit(); Game.registerHook('draw', CM.Disp.Draw); + Game.registerHook('logic', CM.Loop); + } }; diff --git a/src/Main.js b/src/Main.js index 1f44b9a..7e254f6 100644 --- a/src/Main.js +++ b/src/Main.js @@ -93,12 +93,6 @@ CM.ReplaceNative = function() { else return CM.Disp.FormatTime(time / Game.fps, 1); }; - CM.Backup.Loop = Game.Loop; - Game.Loop = function() { - CM.Backup.Loop(); - CM.Loop(); - }; - CM.Backup.Logic = Game.Logic; eval('CM.Backup.LogicMod = ' + Game.Logic.toString().split('document.title').join('CM.Cache.Title')); Game.Logic = function() {