1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
This commit is contained in:
Michał W. Urbańczyk 2012-04-17 15:08:38 +00:00
parent f720038ca5
commit 918452d37c

View File

@ -343,7 +343,9 @@ ui64 evaluateDanger(crint3 tile, const CGHeroInstance *visitor)
if (dangerousObject)
{
//TODO: don't downcast objects AI shouldnt know about!
objectDanger *= fh->getTacticalAdvantage(visitor, dynamic_cast<const CArmedInstance*>(dangerousObject));
auto armedObj = dynamic_cast<const CArmedInstance*>(dangerousObject);
if(armedObj)
objectDanger *= fh->getTacticalAdvantage(visitor, armedObj);
}
}