BURIED: Fix Arthur being visible after AI biochip is lost - bug #313193

This is an original game bug. The fix expands upon the original one so
that the active biochip is only changed if Arthur's biochip was active
before he sacrifices himself
This commit is contained in:
Filippos Karapetis 2022-01-02 12:25:49 +02:00
parent c4d40efd72
commit 74f2df71c3
3 changed files with 9 additions and 1 deletions

View File

@ -115,6 +115,13 @@ bool BioChipRightWindow::destroyBioChipViewWindow() {
return true;
}
void BioChipRightWindow::swapAIBioChipIfActive() {
if (_curBioChip == kItemBioChipAI) {
_curBioChip = kItemBioChipBlank;
invalidateWindow(false);
}
}
void BioChipRightWindow::sceneChanged() {
if (_curBioChip == kItemBioChipAI)
invalidateWindow(false);

View File

@ -52,6 +52,7 @@ public:
bool changeCurrentBioChip(int bioChipID);
bool showBioChipMainView();
bool destroyBioChipViewWindow();
void swapAIBioChipIfActive();
void sceneChanged();
void disableEvidenceCapture();
void jumpInitiated(bool redraw);

View File

@ -346,7 +346,7 @@ int LairEntry::onCharacter(Window *viewWindow, const Common::KeyState &character
_vm->_sound->stopSoundEffect(_currentSoundID);
((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->removeItem(kItemBioChipAI);
((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->addItem(kItemBioChipBlank);
((GameUIWindow *)viewWindow->getParent())->_bioChipRightWindow->changeCurrentBioChip(kItemBioChipBlank);
((GameUIWindow *)viewWindow->getParent())->_bioChipRightWindow->swapAIBioChipIfActive();
_vm->_sound->setAmbientSound(_vm->getFilePath(3, 2, SF_AMBIENT), false, 64);
_passwordIndex = 5;