mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
A better tweak.
This commit is contained in:
@ -907,7 +907,7 @@ void CBattleInterface::showObstacles(std::multimap<BattleHex, int> *hexToObstacl
|
|||||||
std::vector<Cimage> &images = idToObstacle[curOb.ID]->ourImages; //reference to animation of obstacle
|
std::vector<Cimage> &images = idToObstacle[curOb.ID]->ourImages; //reference to animation of obstacle
|
||||||
Rect r = hexPosition(hex);
|
Rect r = hexPosition(hex);
|
||||||
int offset = images.front().bitmap->h % 42;
|
int offset = images.front().bitmap->h % 42;
|
||||||
if(offset > 7) //experimental value, may need tweaking if some obstacles are shown too low/high
|
if(curOb.getInfo().blockedTiles.front() < 0)
|
||||||
offset -= 42;
|
offset -= 42;
|
||||||
|
|
||||||
r.y += 42 - images.front().bitmap->h + offset;
|
r.y += 42 - images.front().bitmap->h + offset;
|
||||||
|
Reference in New Issue
Block a user