mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-25 21:38:59 +02:00
Bug 0001789 correction (incorrect battle field detection)
This commit is contained in:
parent
ccc5c69fa2
commit
e4cbfe7f0b
@ -1953,8 +1953,7 @@ BFieldType CGameState::battleGetBattlefieldType(int3 tile)
|
|||||||
for(auto &obj : map->objects)
|
for(auto &obj : map->objects)
|
||||||
{
|
{
|
||||||
//look only for objects covering given tile
|
//look only for objects covering given tile
|
||||||
if( !obj || obj->pos.z != tile.z
|
if( !obj || obj->pos.z != tile.z || !obj->coveringAt(tile.x, tile.y))
|
||||||
|| !obj->coveringAt(tile.x - obj->pos.x, tile.y - obj->pos.y))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch(obj->ID)
|
switch(obj->ID)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user