1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-29 00:41:38 +02:00

-Fixed crash #1037

-AI can now successfully complete several types of quests.
-Lots of tweaks for AI
TODO: fix bizarre crash when opening borderguard
This commit is contained in:
DjWarmonger
2012-07-19 09:10:55 +00:00
parent 6a7327d38a
commit d8cb3a34d3
8 changed files with 99 additions and 33 deletions

View File

@ -1468,6 +1468,19 @@ void CGameState::init(StartInfo * si)
if(obj->ID == 62) //prison also needs to initialize hero
static_cast<CGHeroInstance*>(obj)->initHero();
}
BOOST_FOREACH(CGObjectInstance *obj, map->objects)
{
switch (obj->ID)
{
case Obj::QUEST_GUARD:
case Obj::SEER_HUT:
{
auto q = static_cast<CGSeerHut*>(obj);
assert (q);
q->setObjToKill();
}
}
}
CGTeleport::postInit(); //pairing subterranean gates
buildBonusSystemTree();