[Scummvm-git-logs] scummvm master -> 13c419649eb27466e3779f0f2a303ec353c9cb27

mduggan noreply at scummvm.org
Tue Dec 28 05:07:12 UTC 2021


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

Summary:
5572ed139f ULTIMA8: Slightly better debug messages
13c419649e ULTIMA8: Workaround for bug #13176


Commit: 5572ed139fe026b90d55a752c68b3f57234c5d7a
    https://github.com/scummvm/scummvm/commit/5572ed139fe026b90d55a752c68b3f57234c5d7a
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-12-28T14:06:05+09:00

Commit Message:
ULTIMA8: Slightly better debug messages

Changed paths:
    engines/ultima/ultima8/world/actors/actor.cpp
    engines/ultima/ultima8/world/container.cpp


diff --git a/engines/ultima/ultima8/world/actors/actor.cpp b/engines/ultima/ultima8/world/actors/actor.cpp
index d1d66fb99fc..5bab5a92c72 100644
--- a/engines/ultima/ultima8/world/actors/actor.cpp
+++ b/engines/ultima/ultima8/world/actors/actor.cpp
@@ -1983,7 +1983,7 @@ Actor *Actor::createActor(uint32 shape, uint32 frame) {
 		     << ")." << Std::endl;
 	}
 
-	Actor *av = getMainActor();
+	const Actor *av = getMainActor();
 	newactor->setMapNum(av->getMapNum());
 	newactor->setNpcNum(objID);
 	newactor->setFlag(FLG_ETHEREAL);
@@ -1995,7 +1995,7 @@ Actor *Actor::createActor(uint32 shape, uint32 frame) {
 void Actor::dumpInfo() const {
 	Container::dumpInfo();
 
-	pout << "hp: " << _hitPoints << ", mp: " << _mana << ", str: " << _strength
+	pout << "  Actor hp: " << _hitPoints << ", mp: " << _mana << ", str: " << _strength
 	     << ", dex: " << _dexterity << ", int: " << _intelligence
 	     << ", ac: " << getArmourClass() << ", defense: " << ConsoleStream::hex
 	     << getDefenseType() << " align: " << getAlignment() << " enemy: "
diff --git a/engines/ultima/ultima8/world/container.cpp b/engines/ultima/ultima8/world/container.cpp
index 27cc7fb88a5..7d1b78935b7 100644
--- a/engines/ultima/ultima8/world/container.cpp
+++ b/engines/ultima/ultima8/world/container.cpp
@@ -328,8 +328,9 @@ void Container::getItemsWithShapeFamily(Std::vector<Item *> &itemlist, uint16 fa
 void Container::dumpInfo() const {
 	Item::dumpInfo();
 
-	pout << "Volume: " << getContentVolume() << "/" << getCapacity()
-	     << ", total weight: " << getTotalWeight() << Std::endl;
+	pout << "  Container vol: " << getContentVolume() << "/" << getCapacity()
+	     << ", total weight: " << getTotalWeight()
+		 << ", items: " << _contents.size() << Std::endl;
 }
 
 void Container::saveData(Common::WriteStream *ws) {


Commit: 13c419649eb27466e3779f0f2a303ec353c9cb27
    https://github.com/scummvm/scummvm/commit/13c419649eb27466e3779f0f2a303ec353c9cb27
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-12-28T14:06:05+09:00

Commit Message:
ULTIMA8: Workaround for bug #13176

Somehow the avatar got added to the ethereal list, but the ethereal flag isn't
set on the actor and avatar shouldn't be ethereal at this point.  Just drop
them from the ethereal list.

I tried working out how it got into this state but can't see any sensible path
that could cause it other than maybe a corrupted save?  For now just do a
workaround.

Changed paths:
    engines/ultima/ultima8/world/world.cpp


diff --git a/engines/ultima/ultima8/world/world.cpp b/engines/ultima/ultima8/world/world.cpp
index 6f4dee39e41..83b7462d2ca 100644
--- a/engines/ultima/ultima8/world/world.cpp
+++ b/engines/ultima/ultima8/world/world.cpp
@@ -142,12 +142,17 @@ bool World::switchMap(uint32 newmap) {
 		if (desktop) desktop->CloseItemDependents();
 	}
 
-	// get rid of any remaining _ethereal items
+	// get rid of any remaining ethereal items
 	while (!_ethereal.empty()) {
 		uint16 eth = _ethereal.front();
 		_ethereal.pop_front();
 		Item *i = getItem(eth);
-		if (i) i->destroy();
+		if (i) {
+			if (i->getFlags() & Item::FLG_ETHEREAL)
+				i->destroy();
+			else
+				warning("Not destroying ethereal item %d - it doesn't think it's ethereal!", eth);
+		}
 	}
 
 	uint32 oldmap = _currentMap->getNum();




More information about the Scummvm-git-logs mailing list