Explorar o código

* resolving #35
* small changes

mateuszb %!s(int64=18) %!d(string=hai) anos
pai
achega
f3b712e6ea
Modificáronse 3 ficheiros con 5 adicións e 2 borrados
  1. 1 1
      CAdvmapInterface.cpp
  2. 1 1
      CCallback.cpp
  3. 3 0
      hch/CAmbarCendamo.cpp

+ 1 - 1
CAdvmapInterface.cpp

@@ -717,7 +717,7 @@ void CTerrainRect::show()
 		tilesw,tilesh,LOCPLINT->adventureInt->position.z,LOCPLINT->adventureInt->anim);
 	SDL_BlitSurface(teren,&genRect(pos.h,pos.w,0,0),ekran,&genRect(547,594,7,6));
 	SDL_FreeSurface(teren);
-	if (currentPath) //drawing path
+	if (currentPath && LOCPLINT->adventureInt->position.z==currentPath->startPos().z) //drawing path
 	{
 		for (int i=0;i<currentPath->nodes.size()-1;i++)
 		{

+ 1 - 1
CCallback.cpp

@@ -51,7 +51,7 @@ bool CCallback::moveHero(int ID, CPath * path, int idtype, int pathType)
 		else
 			hero=gs->players[player].heroes[ID];
 	}
-	else if (idtype==1 && player>=0) //szukamy lokalnie
+	else if (idtype==1 && player>=0) //looking for it in local area
 	{
 		for (int i=0; i<gs->players[player].heroes.size();i++)
 		{

+ 3 - 0
hch/CAmbarCendamo.cpp

@@ -1519,6 +1519,9 @@ void CAmbarCendamo::deh3m()
 				nt->pos = int3(spec->x, spec->y, spec->z);
 				nt->possibleSpells = spec->possibleSpells;
 				nt->obligatorySpells = spec->obligatorySpells;
+				nt->availableSpells = std::vector<CSpell*>();
+				nt->creatureIncome = std::vector<int>();
+				nt->creaturesLeft = std::vector<int>();
 				CGI->townh->townInstances.push_back(nt);
 				break;
 			}