From the name of that function I'm guessing that it runs at the start of taking a screenshot. What if you're taking a mega-/DOF screenshot which takes a bit of time and (supposedly) also ticks the game in the meantime?
Both
doScreenshot() and
doDOFScreenshot() handle the entire processing and writing for the screenshot. Both of them do freeze game ticks though, which is why Badspot disabled
doDOFScreenshot() for the host of a server--at least, that's how it was a couple of versions ago.
package screenshotCallback {
function doScreenShot(%val) {
Parent::doScreenShot(%val);
screenshotCallback();
}
function doDOFScreenShot(%val) {
Parent::doDOFScreenShot(%val);
dofScreenShotCallback();
}
};
activatePackage(screenshotCallback);
Though
doDOFScreenshot() and
doScreenshot() appear to be called twice, one time with
%val = 1; and after with
%val = 0;.
Anyways, that's what I've gotten from messing with
trace() and this:
package screenshotCallback {
function doDOFScreenShot(%val) {
echo(getSimTime());
Parent::doDOFScreenShot(%val);
if(isFile("screenshots/Blockland_00011.png"))
echo("yes!");
echo(getSimTime());
dofScreenShotCallback();
}
};
activatePackage(screenshotCallback);