1
0
Bifurcation 0

Removed unnecessary code and comment from main.lua and added some whitespace and comments into routing_core.lua to help with work on issue #29.

Cette révision appartient à :
Nathanial.C.Jones 2010-11-04 13:32:28 +00:00
Parent 611ef19aeb
révision 7bba7f4453
2 fichiers modifiés avec 4 ajouts et 54 suppressions

Voir le fichier

@ -555,21 +555,6 @@ QH_Event("ADDON_LOADED", function (addonid)
local major, minor = (version_string or ""):match("^(%d+)%.(%d+)")
major, minor = tonumber(major), tonumber(minor)
-- For versions before 0.82, we're changing the default level offset to 3.
if major == 0 and minor and minor < 82 and QuestHelper_Pref.level == 2 then
QuestHelper_Pref.level = nil
end
-- For versions before 0.84...
if major == 0 and minor and minor < 84 then
-- remove all keys that match their default setting.
for key, val in pairs(QuestHelper_DefaultPref) do
if QuestHelper_Pref[key] == val then
QuestHelper_Pref[key] = nil
end
end
end
QH_Hook(self, "OnUpdate", self.OnUpdate)
-- Seems to do its own garbage collection pass before fully loading, so I'll just rely on that
@ -592,45 +577,6 @@ QH_Event("ADDON_LOADED", function (addonid)
self.Routing:Initialize() -- Set up the routing task
end, "init")]] -- FUCK YOU BOXBOT
--[[ -- This is just an example of how the WoW profiler biases its profiles heavily.
function C()
end
function A()
q = 0
for x = 0, 130000000, 1 do
end
end
function B()
q = 0
for x = 0, 12000000, 1 do
C()
end
end
function B2()
q = 0
for x = 0, 1200000, 1 do
--q = q + x
C()
end
end
debugprofilestart()
local ta = debugprofilestop()
A()
local tb = debugprofilestop()
B()
local tc = debugprofilestop()
QuestHelper:TextOut(string.format("%d %d %d", ta, tb - ta, tc - tb))
QuestHelper:TextOut(string.format("%d %d", GetFunctionCPUUsage(A), GetFunctionCPUUsage(B)))
--/script SetCVar("scriptProfile", value)]]
QH_Event("CHAT_MSG_ADDON", function (...)
if arg1 == "QHpr" and arg4 ~= UnitName("player") then
QH_Questcomm_Msg(arg2, arg4)

Voir le fichier

@ -725,6 +725,7 @@ local function BetterRoute(route)
end
local QH_Route_Core_DistanceClear_Local -- sigh
-- Core process function
function QH_Route_Core_Process()
early_exit = false
@ -853,6 +854,8 @@ function QH_Route_Core_Process()
--QuestHelper:TextOut("Anting")
local trouts = QuestHelper:CreateTable("routing_core_trouts")
-- Run the ants through the system building routes.
for x = 1, AntCount do
if early_exit then if debug_output then QuestHelper:TextOut("early exit") end return end -- get money fuck routing
local ant = RunAnt()
@ -883,6 +886,7 @@ function QH_Route_Core_Process()
QH_Timeslice_Yield()
-- Next 3 loops are essentially pheromone update.
for _, x in ipairs(ActiveNodes) do
local wx = Weight[x]
for _, y in ipairs(ActiveNodes) do