From 36be8ef1278573bfa2067105038f44112b66c509 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sat, 9 Feb 2013 20:17:38 +0000 Subject: [PATCH] Fix error in how variable quantities are added and subtracted. The values should be appropriately scaled by the origins in the case where the quantities are "parallel" to each other. Also fix NextTick() condition to account for the math correction. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@685 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleBestAction.lua | 4 ++-- OvaleCondition.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua index d7a4cbd..09e9096 100644 --- a/OvaleBestAction.lua +++ b/OvaleBestAction.lua @@ -576,13 +576,13 @@ function OvaleBestAction:Compute(element) end elseif element.operator == "+" then if c+z == 0 then - l = a+x; m = 0; n = 0 + l = (a+x) - (b-y)*c; m = 0; n = 0 else l = a+x; m = (b*c+y*z)/(c+z); n = c+z end elseif element.operator == '-' then if c-z == 0 then - l = a-x; m = 0; n = 0 + l = (a-x) - (b-y)*c; m = 0; n = 0 else l = a-x; m = (b*c-y*z)/(c-z); n = c-z end diff --git a/OvaleCondition.lua b/OvaleCondition.lua index aa19399..b33c9f1 100644 --- a/OvaleCondition.lua +++ b/OvaleCondition.lua @@ -1950,7 +1950,7 @@ OvaleCondition.conditions.nexttick = function(condition) while ending - tickLength > OvaleState.currentTime do ending = ending - tickLength end - return 0, nil, ending, 0, -1 + return 0, nil, 0, ending, -1 end return nil end -- 1.7.9.5