From 75fe72b27cd2a76a2ecee8f0476a9ef089e6d857 Mon Sep 17 00:00:00 2001 From: Bendegúz Nagy Date: Wed, 13 Jul 2016 19:12:55 +0200 Subject: DM: Add input timeout and fix movement after throwing a projectile --- engines/dm/dm.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 194bfa2a8a..6a50e3eade 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -369,9 +369,6 @@ T0002002: if (!(_g313_gameTime & 511)) _inventoryMan->f338_decreaseTorchesLightPower(); - if (_g310_disabledMovementTicks) - _g310_disabledMovementTicks--; - if (_championMan->_g407_party._freezeLifeTicks) _championMan->_g407_party._freezeLifeTicks -= 1; @@ -384,10 +381,12 @@ T0002002: if (_g310_disabledMovementTicks) _g310_disabledMovementTicks--; - // F0044_TEXT_MESSAGEAREA_ClearExpiredRows(); + if (_g311_projectileDisableMovementTicks) + _g311_projectileDisableMovementTicks--; + // F0044_TEXT_MESSAGEAREA_ClearExpiredRows(); _g321_stopWaitingForPlayerInput = false; - + uint16 vblankCounter = 0; do { _eventMan->processInput(); @@ -406,9 +405,12 @@ T0002002: // if (!_vm->_g321_stopWaitingForPlayerInput) { // F0363_COMMAND_HighlightBoxDisable(); // } - } while (!_g321_stopWaitingForPlayerInput || !_g301_gameTimeTicking); - _system->delayMillis(18); + _system->delayMillis(2); + if (++vblankCounter >= _g318_waitForInputMaxVerticalBlankCount * 5) + _g321_stopWaitingForPlayerInput = true; + + } while (!_g321_stopWaitingForPlayerInput || !_g301_gameTimeTicking); } } -- cgit v1.2.3