delay with initial condition passing still delays (+fix)
Posted: Mon Sep 25, 2017 2:58 am
To fix this, I checked for the initial delay condition already in MQ2MacroCommands.cpp:Delay,
by adding to the end of the function:
It would be nice to integrate this, or any similar fix - when I do not have good fps, and my casting macros check for multiple delay conditions that mostly pass for each spell, without this my casting can easily get up to 0.5s unintended delays.
by adding to the end of the function:
Code: Select all
if (gDelayCondition[0]) {
CHAR szCond[MAX_STRING];
strcpy_s(szCond, gDelayCondition);
ParseMacroParameter(GetCharInfo()->pSpawn, szCond);
DOUBLE Result;
if (!Calculate(szCond, Result)) {
FatalError("Failed to parse /delay condition '%s', non-numeric encountered", szCond);
return;
}
if (Result != 0) {
// DebugSpewNoFile("/delay ending early, conditions met");
gDelay = 0;
bRunNextCommand = true;
}
}