Page 1 of 1

delay with initial condition passing still delays (+fix)

Posted: Mon Sep 25, 2017 2:58 am
by silverj
To fix this, I checked for the initial delay condition already in MQ2MacroCommands.cpp:Delay,
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;
		}
	}
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.

Re: delay with initial condition passing still delays (+fix)

Posted: Mon Sep 25, 2017 6:52 am
by EqMule
Thanks I can add this