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

Bug 0001789 correction (incorrect battle field detection)

This commit is contained in:
Macron1Robot 2014-05-18 03:09:42 +04:00
parent ccc5c69fa2
commit e4cbfe7f0b

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)