mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
- Restored correct specialty serialization (#1599 and all its children)
- Fixed rare AI crash - Fixed AI visiting some objects many times - Some cleanup and refactoring
This commit is contained in:
@@ -467,6 +467,8 @@ float FuzzyHelper::evaluate (Goals::VisitTile & g)
|
||||
float FuzzyHelper::evaluate (Goals::VisitHero & g)
|
||||
{
|
||||
auto obj = cb->getObj(ObjectInstanceID(g.objid)); //we assume for now that these goals are similiar
|
||||
if (!obj)
|
||||
return -100; //hero died in the meantime
|
||||
//TODO: consider direct copy (constructor?)
|
||||
g.setpriority(Goals::VisitTile(obj->visitablePos()).sethero(g.hero).setisAbstract(g.isAbstract).accept(this));
|
||||
return g.priority;
|
||||
|
Reference in New Issue
Block a user