1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

lib/rmg/CRmgTemplateZone.cpp: Add parenthesis to make operator precedence unambiguous

This commit is contained in:
Johannes 'josch' Schauer 2018-04-19 15:06:26 +02:00
parent d9d01f0b68
commit 56fefca806
No known key found for this signature in database
GPG Key ID: F2CBA5C78FBD83E1

View File

@ -600,7 +600,7 @@ bool CRmgTemplateZone::createRoad(const int3& src, const int3& dst)
auto obj = tile->topVisitableObj();
bool canMoveBetween = gen->map->canMoveBetween(currentNode, pos);
if (gen->isFree(pos) && gen->isFree(currentNode) //empty path
if ((gen->isFree(pos) && gen->isFree(currentNode)) //empty path
|| ((tile->visitable || currentTile->visitable) && canMoveBetween) //moving from or to visitable object
|| pos == dst) //we already compledted the path
{