CRYOMNI3D: Deselect object when removing from inventory

This commit is contained in:
Le Philousophe 2019-03-21 07:55:55 +01:00 committed by Eugene Sandulenko
parent 6d36bc3cca
commit 9bfc24eee3
3 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -294,7 +294,6 @@ void CryOmni3DEngine_Versailles::dialogShowBontempsGivesKey() {
void CryOmni3DEngine_Versailles::dialogShowDuMaineLeaves() {
playInGameVideo("62S_DUC1");
_inventory.removeByNameID(144);
_inventory.deselectObject();
setPlaceState(19, 1);
}

View File

@ -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) {