diff options
Diffstat (limited to 'engines/tsage/core.cpp')
-rw-r--r-- | engines/tsage/core.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 6b4e2963a5..055005808c 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1179,7 +1179,7 @@ void PaletteRotation::signal() { int count = _end - _currIndex; g_system->getPaletteManager()->setPalette((const byte *)&_palette[_currIndex * 3], _start, count); - if (count2) { + if (count2 > 0) { g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start * 3], _start + count, count2); } } @@ -2111,8 +2111,13 @@ int SceneObject::getFrameCount() { void SceneObject::animEnded() { _animateMode = ANIM_MODE_NONE; - if (_endAction) - _endAction->signal(); + if (_endAction) { + Action *endAction = _endAction; + if (g_vm->getGameID() == GType_Ringworld2) + _endAction = NULL; + + endAction->signal(); + } } int SceneObject::changeFrame() { @@ -3262,6 +3267,7 @@ void Player::postInit(SceneObjectList *OwnerList) { _moveDiff.y = 2; _effect = 1; _shade = 0; + _linkedActor = NULL; setObjectWrapper(new SceneObjectWrapper()); setPosition(_characterPos[_characterIndex]); @@ -3992,7 +3998,7 @@ int WalkRegions::indexOf(const Common::Point &pt, const Common::List<int> *index } void WalkRegions::synchronize(Serializer &s) { - // Synchronise the list of disabled regions as a list of values terminated with a '-1' + // Synchronize the list of disabled regions as a list of values terminated with a '-1' int regionId = 0; if (s.isLoading()) { _disabledRegions.clear(); @@ -4242,9 +4248,10 @@ void SceneHandler::process(Event &event) { // Scan the item list to find one the mouse is within SynchronizedList<SceneItem *>::iterator i; for (i = g_globals->_sceneItems.begin(); i != g_globals->_sceneItems.end(); ++i) { - if ((*i)->contains(event.mousePos)) { + SceneItem *item = *i; + if (item->contains(event.mousePos)) { // Pass the action to the item - bool handled = (*i)->startAction(g_globals->_events.getCursor(), event); + bool handled = item->startAction(g_globals->_events.getCursor(), event); if (!handled) // Item wasn't handled, keep scanning continue; |