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:
@ -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();
|
||||
|
Reference in New Issue
Block a user