Browse Source

Probably fixed #732, one more fix for spawning wandering monsters.

Michał W. Urbańczyk 14 năm trước cách đây
mục cha
commit
47e4c8d6e6
2 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 3 0
      client/CPlayerInterface.cpp
  2. 2 2
      lib/CCreatureSet.cpp

+ 3 - 0
client/CPlayerInterface.cpp

@@ -1329,7 +1329,10 @@ void CPlayerInterface::update()
 
 	//in some conditions we may receive calls before selection is initialized - we must ignore them
 	if(adventureInt && !adventureInt->selection && GH.topInt() == adventureInt)
+	{
+		pim->unlock();
 		return;
+	}
 
 	// Handles mouse and key input
 	GH.updateTime();

+ 2 - 2
lib/CCreatureSet.cpp

@@ -525,8 +525,8 @@ void CStackInstance::setType(const CCreature *c)
 	}
 
 	type = c;
-
-	attachTo(const_cast<CCreature*>(type));
+	if(type)
+		attachTo(const_cast<CCreature*>(type));
 }
 std::string CStackInstance::bonusToString(Bonus *bonus, bool description) const
 {