[Scummvm-git-logs] scummvm master -> b0a0ebfb5bbb2e7e7f4aaf4258581bd1243453ef

mduggan noreply at scummvm.org
Fri Mar 24 01:06:23 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b0a0ebfb5b TETRAEDGE: Clear inventory on game load (fixes #14358)


Commit: b0a0ebfb5bbb2e7e7f4aaf4258581bd1243453ef
    https://github.com/scummvm/scummvm/commit/b0a0ebfb5bbb2e7e7f4aaf4258581bd1243453ef
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-03-24T10:06:10+09:00

Commit Message:
TETRAEDGE: Clear inventory on game load (fixes #14358)

Changed paths:
    engines/tetraedge/game/inventory.cpp


diff --git a/engines/tetraedge/game/inventory.cpp b/engines/tetraedge/game/inventory.cpp
index bf682817226..e75ad1f090d 100644
--- a/engines/tetraedge/game/inventory.cpp
+++ b/engines/tetraedge/game/inventory.cpp
@@ -551,6 +551,11 @@ Common::Error Inventory::syncStateWithCount(Common::Serializer &s, uint nitems)
 		error("Unexpected number of elems syncing inventory");
 
 	if (s.isLoading()) {
+		_invObjects.clear();
+		_selectedObject = nullptr;
+		// Clear the layout if needed
+		if (_gui.loaded())
+			updateLayout();
 #ifdef TETRAEDGE_DEBUG_SAVELOAD
 		debug("Inventory::syncState: --- Loading %d inventory items: ---", nitems);
 #endif




More information about the Scummvm-git-logs mailing list