소스 검색

Fixed #608. I just ignored odd postInit interface, hope that's fine.

DjWarmonger 15 년 전
부모
커밋
0c4bec0a52
2개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 2
      hch/CObjectHandler.cpp
  2. 3 3
      lib/CGameState.cpp

+ 0 - 2
hch/CObjectHandler.cpp

@@ -3561,8 +3561,6 @@ void CGTeleport::postInit() //matches subterranean gates into pairs
 			gates.push_back(std::pair<int, int>(cur->id, -1));
 			gates.push_back(std::pair<int, int>(cur->id, -1));
 		}
 		}
 	}
 	}
-
-
 	objs.erase(103);
 	objs.erase(103);
 }
 }
 
 

+ 3 - 3
lib/CGameState.cpp

@@ -154,8 +154,8 @@ public:
 
 
 	void postInit()
 	void postInit()
 	{
 	{
-// 		for (size_t i = 0; i < apps.size(); i++)
-// 			apps[i]->postInit();
+	//for (size_t i = 0; i < apps.size(); i++)
+	//apps[i]->postInit();
 	}
 	}
 } *objCaller = NULL;
 } *objCaller = NULL;
 
 
@@ -1822,7 +1822,7 @@ void CGameState::init( StartInfo * si, ui32 checksum, int Seed )
 		if(map->objects[i]->ID == 62) //prison also needs to initialize hero
 		if(map->objects[i]->ID == 62) //prison also needs to initialize hero
 			static_cast<CGHeroInstance*>(map->objects[i])->initHero();
 			static_cast<CGHeroInstance*>(map->objects[i])->initHero();
 	}
 	}
-	objCaller->postInit();
+	CGTeleport::postInit(); //pairing subterranean gates
 }
 }
 
 
 bool CGameState::battleCanFlee(int player)
 bool CGameState::battleCanFlee(int player)