1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Merge pull request #10 from Macron1Robot/works

Bug 0001789 correction (incorrect battle field detection)
This commit is contained in:
DjWarmonger
2014-05-18 08:26:36 +02:00

View File

@ -1953,8 +1953,7 @@ BFieldType CGameState::battleGetBattlefieldType(int3 tile)
for(auto &obj : map->objects)
{
//look only for objects covering given tile
if( !obj || obj->pos.z != tile.z
|| !obj->coveringAt(tile.x - obj->pos.x, tile.y - obj->pos.y))
if( !obj || obj->pos.z != tile.z || !obj->coveringAt(tile.x, tile.y))
continue;
switch(obj->ID)