From ee4305cd6da8d4736bf34a4e99e55290b0064b4e Mon Sep 17 00:00:00 2001 From: ArseniyShestakov Date: Sat, 10 Oct 2015 19:02:21 +0300 Subject: [PATCH] CPathfinder: move destTopVisObjID where it's belongs to --- lib/CGameState.cpp | 2 +- lib/CGameState.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp index 5130dc3fb..89187457b 100644 --- a/lib/CGameState.cpp +++ b/lib/CGameState.cpp @@ -3411,7 +3411,6 @@ void CPathfinder::calculatePaths() { dp = getNode(neighbour); dt = &gs->map->getTile(neighbour); - destTopVisObjID = dt->topVisitableId(); useEmbarkCost = 0; //0 - usual movement; 1 - embark; 2 - disembark const bool destIsGuardian = sourceGuardPosition == neighbour; @@ -3552,6 +3551,7 @@ CGPathNode::EAccessibility CPathfinder::evaluateAccessibility(const TerrainTile bool CPathfinder::goodForLandSeaTransition() { + Obj destTopVisObjID = dt->topVisitableId(); if(cp->land != dp->land) //hero can traverse land<->sea only in special circumstances { if(cp->land) //from land to sea -> embark or assault hero on boat diff --git a/lib/CGameState.h b/lib/CGameState.h index d4891aba4..f95513b2c 100644 --- a/lib/CGameState.h +++ b/lib/CGameState.h @@ -297,7 +297,6 @@ private: CGPathNode *dp; //destination node -> it's a neighbour of cp that we consider const TerrainTile *ct, *dt; //tile info for both nodes ui8 useEmbarkCost; //0 - usual movement; 1 - embark; 2 - disembark - Obj destTopVisObjID; CGObjectInstance *sTileObj; CGObjectInstance *dTileObj;