aboutsummaryrefslogtreecommitdiff
path: root/engines/cryomni3d
diff options
context:
space:
mode:
authorLe Philousophe2019-03-21 07:55:55 +0100
committerEugene Sandulenko2019-06-01 22:43:48 +0200
commit9bfc24eee3f724fab4aadad17d6c4664682f7aa3 (patch)
tree67a6bcd26e67b0bcbad7b7fc86cb63b6396a975e /engines/cryomni3d
parent6d36bc3ccad575d35286eae1cbda985947ba5242 (diff)
downloadscummvm-rg350-9bfc24eee3f724fab4aadad17d6c4664682f7aa3.tar.gz
scummvm-rg350-9bfc24eee3f724fab4aadad17d6c4664682f7aa3.tar.bz2
scummvm-rg350-9bfc24eee3f724fab4aadad17d6c4664682f7aa3.zip
CRYOMNI3D: Deselect object when removing from inventory
Diffstat (limited to 'engines/cryomni3d')
-rw-r--r--engines/cryomni3d/objects.cpp2
-rw-r--r--engines/cryomni3d/versailles/dialogs.cpp1
-rw-r--r--engines/cryomni3d/versailles/logic.cpp1
3 files changed, 2 insertions, 2 deletions
diff --git a/engines/cryomni3d/objects.cpp b/engines/cryomni3d/objects.cpp
index 1c06eb1ea1..5d79c5f56c 100644
--- a/engines/cryomni3d/objects.cpp
+++ b/engines/cryomni3d/objects.cpp
@@ -69,6 +69,7 @@ void Inventory::remove(unsigned int position) {
void Inventory::removeByIconID(unsigned int iconID) {
for (iterator it = begin(); it != end(); it++) {
if ((*it) && (*it)->idCA() == iconID) {
+ deselectObject();
remove(it - begin());
return;
}
@@ -79,6 +80,7 @@ void Inventory::removeByIconID(unsigned int iconID) {
void Inventory::removeByNameID(unsigned int nameID) {
for (iterator it = begin(); it != end(); it++) {
if ((*it) && (*it)->idOBJ() == nameID) {
+ deselectObject();
remove(it - begin());
return;
}
diff --git a/engines/cryomni3d/versailles/dialogs.cpp b/engines/cryomni3d/versailles/dialogs.cpp
index b74e2f0a39..ed5921397b 100644
--- a/engines/cryomni3d/versailles/dialogs.cpp
+++ b/engines/cryomni3d/versailles/dialogs.cpp
@@ -294,7 +294,6 @@ void CryOmni3DEngine_Versailles::dialogShowBontempsGivesKey() {
void CryOmni3DEngine_Versailles::dialogShowDuMaineLeaves() {
playInGameVideo("62S_DUC1");
_inventory.removeByNameID(144);
- _inventory.deselectObject();
setPlaceState(19, 1);
}
diff --git a/engines/cryomni3d/versailles/logic.cpp b/engines/cryomni3d/versailles/logic.cpp
index e824031539..f898778004 100644
--- a/engines/cryomni3d/versailles/logic.cpp
+++ b/engines/cryomni3d/versailles/logic.cpp
@@ -1314,7 +1314,6 @@ FILTER_EVENT(2, 1) {
if (idOBJ == 98 && _dialogsMan["JOUEUR-CONFIE-MESSAGE-HUISSIER"] == 'Y') {
_inventory.removeByNameID(98);
- _inventory.deselectObject();
setGameTime(2, 2);
}
} else if (*event == 31101) {