SHERLOCK: Fix trying to move items that can't be
This commit is contained in:
parent
e25fbfa8e4
commit
8e4ccdbd2c
1 changed files with 32 additions and 31 deletions
|
@ -2585,6 +2585,17 @@ void UserInterface::checkAction(ActionType &action, const char *const messages[]
|
||||||
if (objNum >= 1000)
|
if (objNum >= 1000)
|
||||||
// Ignore actions done on characters
|
// Ignore actions done on characters
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!action._cAnimSpeed) {
|
||||||
|
// Invalid action, to print error message
|
||||||
|
_infoFlag = true;
|
||||||
|
clearInfo();
|
||||||
|
screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, messages[action._cAnimNum]);
|
||||||
|
_infoFlag = true;
|
||||||
|
|
||||||
|
// Set how long to show the message
|
||||||
|
_menuCounter = 30;
|
||||||
|
} else {
|
||||||
Object &obj = scene._bgShapes[objNum];
|
Object &obj = scene._bgShapes[objNum];
|
||||||
|
|
||||||
if (action._cAnimNum == 0)
|
if (action._cAnimNum == 0)
|
||||||
|
@ -2610,7 +2621,6 @@ void UserInterface::checkAction(ActionType &action, const char *const messages[]
|
||||||
dir = -1;
|
dir = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action._cAnimSpeed) {
|
|
||||||
// Has a value, so do action
|
// Has a value, so do action
|
||||||
// Show wait cursor whilst walking to object and doing action
|
// Show wait cursor whilst walking to object and doing action
|
||||||
events.setCursor(WAIT);
|
events.setCursor(WAIT);
|
||||||
|
@ -2686,15 +2696,6 @@ void UserInterface::checkAction(ActionType &action, const char *const messages[]
|
||||||
_menuCounter = 30;
|
_menuCounter = 30;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// Invalid action, to print error message
|
|
||||||
_infoFlag = true;
|
|
||||||
clearInfo();
|
|
||||||
screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, messages[action._cAnimNum]);
|
|
||||||
_infoFlag = true;
|
|
||||||
|
|
||||||
// Set how long to show the message
|
|
||||||
_menuCounter = 30;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset cursor back to arrow
|
// Reset cursor back to arrow
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue