Browse Source

Fixed #351.
Fixed grail placement.
Fixed crashbug with removing monster on RoE map.
Version set to 0.75d

Michał W. Urbańczyk 15 years ago
parent
commit
51946e60a5
4 changed files with 6 additions and 5 deletions
  1. 3 2
      client/CPlayerInterface.cpp
  2. 1 1
      global.h
  3. 1 1
      lib/NetPacksLib.cpp
  4. 1 1
      lib/map.cpp

+ 3 - 2
client/CPlayerInterface.cpp

@@ -230,9 +230,10 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
 
 	if(makingTurn  &&  ho->tempOwner == playerID) //we are moving our hero - we may need to update assigned path
 	{
-		if(details.result == TryMoveHero::TELEPORTATION/*	||  details.start == details.end*/)
+		if(details.result == TryMoveHero::TELEPORTATION	||  details.start == details.end)
 		{
-			adventureInt->eraseCurrentPathOf(ho);
+			if(adventureInt->terrain.currentPath)
+				adventureInt->eraseCurrentPathOf(ho);
 			return; //teleport - no fancy moving animation
 					//TODO: smooth disappear / appear effect
 		}

+ 1 - 1
global.h

@@ -20,7 +20,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
 #define THC
 #endif
 
-#define NAME_VER ("VCMI 0.75c")
+#define NAME_VER ("VCMI 0.75d")
 extern std::string NAME; //full name
 extern std::string NAME_AFFIX; //client / server
 #define CONSOLE_LOGGING_LEVEL 5

+ 1 - 1
lib/NetPacksLib.cpp

@@ -286,7 +286,7 @@ DLL_EXPORT void RemoveObject::applyGs( CGameState *gs )
 
 		//TODO: add to the pool?
 	}
-	else if (obj->ID==CREI_TYPE) //only fixed monsters can be a part of quest
+	else if (obj->ID==CREI_TYPE  &&  gs->map->version > CMapHeader::RoE) //only fixed monsters can be a part of quest
 	{
 		CGCreature *cre = static_cast<CGCreature*>(obj);
 		gs->map->monsters[cre->identifier]->pos = int3 (-1,-1,-1);	//use nonexistent monster for quest :>

+ 1 - 1
lib/map.cpp

@@ -529,7 +529,7 @@ void Mapa::addBlockVisTiles(CGObjectInstance * obj)
 	}
 }
 Mapa::Mapa(std::string filename)
-	:grailPos(-1, -1, -1)
+	:grailPos(-1, -1, -1), grailRadious(0)
 {
 	int mapsize = 0;