mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
#1579 - check z coord as well
This commit is contained in:
parent
27ef876bd6
commit
47b253e837
@ -1865,6 +1865,9 @@ void CGameState::placeHeroesInTowns()
|
||||
{
|
||||
for(CGTownInstance *t : k->second.towns)
|
||||
{
|
||||
if(h->visitablePos().z != t->visitablePos().z)
|
||||
continue;
|
||||
|
||||
bool heroOnTownBlockableTile = t->blockingAt(h->visitablePos().x, h->visitablePos().y);
|
||||
|
||||
// current hero position is at one of blocking tiles of current town
|
||||
@ -1896,6 +1899,9 @@ void CGameState::initVisitingAndGarrisonedHeroes()
|
||||
{
|
||||
for(CGTownInstance *t : k->second.towns)
|
||||
{
|
||||
if(h->visitablePos().z != t->visitablePos().z)
|
||||
continue;
|
||||
|
||||
if (t->visitableAt(h->visitablePos().x, h->visitablePos().y))
|
||||
{
|
||||
assert(t->visitingHero == nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user