mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Merge pull request #1590 from vcmi/fix-1579
#1579 - check z coord as well
This commit is contained in:
commit
3033b9751e
@ -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