aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge2/cge2_main.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index 764bdde5d8..99b0f26c21 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -533,13 +533,11 @@ bool CGE2Engine::isHero(Sprite *spr) {
void CGE2Engine::tick() {
for (Sprite *spr = _vga->_showQ->first(); spr; spr = spr->_next) {
- if (spr->_time) {
- if (--spr->_time == 0)
+ if (spr->_time && (--spr->_time == 0))
spr->tick();
- }
+
if (_waitRef) {
- if (_waitRef == spr->_ref)
- if (spr->seqTest(_waitSeq))
+ if (_waitRef == spr->_ref && spr->seqTest(_waitSeq))
_waitRef = 0;
}
}