From 0053e8ded6848ef049b6721aa4873adc98b8b46c Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sun, 4 Nov 2012 11:08:58 +0100 Subject: [PATCH] Throttle the coordinate calls on the world map --- TomTom.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/TomTom.lua b/TomTom.lua index 3ca5034..1b6a0b3 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -47,6 +47,7 @@ function TomTom:Initialize(event, addon) playeraccuracy = 2, cursorenable = true, cursoraccuracy = 2, + throttle = 0.1, }, arrow = { enable = true, @@ -997,7 +998,15 @@ do return fmt:format(x*100, y*100) end + + local coord_throttle = 0 function WorldMap_OnUpdate(self, elapsed) + coord_throttle = coord_throttle + elapsed + if coord_throttle <= TomTom.profile.mapcoords.throttle then + return + end + + coord_throttle = 0 local x,y = TomTom:GetCurrentCoords() local opt = TomTom.db.profile -- 1.7.9.5