mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
BattleAI: take into account defender dragon breath and other mutitarget attacks
This commit is contained in:
@ -161,13 +161,13 @@ void CAnimation::verticalFlip()
|
||||
|
||||
void CAnimation::horizontalFlip(size_t frame, size_t group)
|
||||
{
|
||||
try
|
||||
auto i1 = images.find(group);
|
||||
if(i1 != images.end())
|
||||
{
|
||||
images.at(group).at(frame) = nullptr;
|
||||
}
|
||||
catch (const std::out_of_range &)
|
||||
{
|
||||
// ignore - image not loaded
|
||||
auto i2 = i1->second.find(frame);
|
||||
|
||||
if(i2 != i1->second.end())
|
||||
i2->second = nullptr;
|
||||
}
|
||||
|
||||
auto locator = getImageLocator(frame, group);
|
||||
@ -177,13 +177,13 @@ void CAnimation::horizontalFlip(size_t frame, size_t group)
|
||||
|
||||
void CAnimation::verticalFlip(size_t frame, size_t group)
|
||||
{
|
||||
try
|
||||
auto i1 = images.find(group);
|
||||
if(i1 != images.end())
|
||||
{
|
||||
images.at(group).at(frame) = nullptr;
|
||||
}
|
||||
catch (const std::out_of_range &)
|
||||
{
|
||||
// ignore - image not loaded
|
||||
auto i2 = i1->second.find(frame);
|
||||
|
||||
if(i2 != i1->second.end())
|
||||
i2->second = nullptr;
|
||||
}
|
||||
|
||||
auto locator = getImageLocator(frame, group);
|
||||
|
Reference in New Issue
Block a user