mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-08 10:51:11 +00:00
ULTIMA4: Fix turns to correctly pass after 20 seconds
This commit is contained in:
parent
d7916dedfd
commit
83ae05b3df
@ -3004,8 +3004,9 @@ void GameController::timerFired() {
|
||||
* force pass if no commands within last 20 seconds
|
||||
*/
|
||||
Controller *controller = eventHandler->getController();
|
||||
if (controller != NULL && (eventHandler->getController() == g_game || dynamic_cast<CombatController *>(eventHandler->getController()) != NULL) &&
|
||||
gameTimeSinceLastCommand() > 20) {
|
||||
if (controller != NULL && (eventHandler->getController() == g_game ||
|
||||
dynamic_cast<CombatController *>(eventHandler->getController()) != NULL) &&
|
||||
gameTimeSinceLastCommand() > 20) {
|
||||
|
||||
/* pass the turn, and redraw the text area so the prompt is shown */
|
||||
controller->keyPressed(U4_SPACE);
|
||||
@ -3172,7 +3173,7 @@ void gameFixupObjects(Map *map) {
|
||||
}
|
||||
|
||||
time_t gameTimeSinceLastCommand() {
|
||||
return g_system->getMillis() - g_context->_lastCommandTime;
|
||||
return (g_system->getMillis() - g_context->_lastCommandTime) / 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user