LAB: Get rid of the rest of the custom time delay functions

This commit is contained in:
Filippos Karapetis 2015-12-13 04:53:12 +02:00 committed by Willem Jan Palenstijn
parent 1b0a7db0b6
commit 452c20ab8a
6 changed files with 12 additions and 111 deletions

View file

@ -1145,12 +1145,7 @@ int LabEngine::followCrumbs() {
};
if (_isCrumbWaiting) {
uint32 Secs;
uint32 Micros;
_utils->timeDiff(_crumbSecs, _crumbMicros, &Secs, &Micros);
if (Secs != 0 || Micros != 0)
if (g_system->getMillis() <= _crumbSecs * 1000 + _crumbMicros)
return 0;
_isCrumbWaiting = false;
@ -1193,7 +1188,8 @@ int LabEngine::followCrumbs() {
_isCrumbTurning = (moveDir != VKEY_UPARROW);
_isCrumbWaiting = true;
_utils->addCurTime(theDelay / ONESECOND, theDelay % ONESECOND, &_crumbSecs, &_crumbMicros);
_crumbSecs = (theDelay + g_system->getMillis()) / 1000;
_crumbMicros = (theDelay + g_system->getMillis()) % 1000;
}
return moveDir;