mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fixed #930.
This commit is contained in:
parent
f720038ca5
commit
918452d37c
@ -343,7 +343,9 @@ ui64 evaluateDanger(crint3 tile, const CGHeroInstance *visitor)
|
|||||||
if (dangerousObject)
|
if (dangerousObject)
|
||||||
{
|
{
|
||||||
//TODO: don't downcast objects AI shouldnt know about!
|
//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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user