PINK: fix inventory opening

This commit is contained in:
whiterandrek 2018-06-12 22:21:03 +03:00 committed by Eugene Sandulenko
parent b6658eb9a8
commit 2c6ab1c775
3 changed files with 6 additions and 6 deletions

View File

@ -381,9 +381,9 @@ Actor *LeadActor::getActorByPoint(const Common::Point point) {
return _page->getGame()->getDirector()->getActorByPoint(point);
}
void LeadActor::startInventory(bool fromSave) {
getInventoryMgr()->start(fromSave);
if (!fromSave) {
void LeadActor::startInventory(bool paused) {
getInventoryMgr()->start(paused);
if (!paused) {
_isHaveItem = false;
_stateCopy = _state;
_state = kInventory;

View File

@ -98,7 +98,7 @@ void InventoryMgr::setItemOwner(const Common::String &owner, InventoryItem *item
_item = item;
}
bool InventoryMgr::start(bool playOpening) {
bool InventoryMgr::start(bool paused) {
if (!_item) {
_item = findInventoryItem(_lead->getName());
if (!_item)
@ -110,7 +110,7 @@ bool InventoryMgr::start(bool playOpening) {
_rightArrow = _lead->getPage()->findActor(kInventoryRightArrowActor);
_leftArrow = _lead->getPage()->findActor(kInventoryLeftArrowActor);
if (playOpening) {
if (!paused) {
_window->setAction(kOpenAction);
_state = kOpening;
}

View File

@ -59,7 +59,7 @@ public:
void update();
void onClick(Common::Point point);
bool start(bool playOpening);
bool start(bool paused);
void setLeadActor(LeadActor *lead) { _lead = lead; }
InventoryItem* findInventoryItem(const Common::String &name);