aboutsummaryrefslogtreecommitdiff
path: root/engines/director/score.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/director/score.cpp')
-rw-r--r--engines/director/score.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index c26a09927f..aa4828ead7 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -991,11 +991,13 @@ void Score::processEvents() {
Common::Point pos = g_system->getEventManager()->getMousePos();
// D3 doesn't have both mouse up and down.
+ // But we still want to know if the mouse is down for press effects.
+ _currentMouseDownSpriteId = _frames[_currentFrame]->getSpriteIDFromPos(pos);
+
if (_vm->getVersion() > 3) {
// TODO: check that this is the order of script execution!
- uint16 spriteId = _frames[_currentFrame]->getSpriteIDFromPos(pos);
- _lingo->processEvent(kEventMouseDown, kCastScript, _frames[_currentFrame]->_sprites[spriteId]->_castId);
- _lingo->processEvent(kEventMouseDown, kSpriteScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId);
+ _lingo->processEvent(kEventMouseDown, kCastScript, _frames[_currentFrame]->_sprites[_currentMouseDownSpriteId]->_castId);
+ _lingo->processEvent(kEventMouseDown, kSpriteScript, _frames[_currentFrame]->_sprites[_currentMouseDownSpriteId]->_scriptId);
}
}