mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
CPathfinder: move destTopVisObjID where it's belongs to
This commit is contained in:
parent
13c2b5e2d8
commit
ee4305cd6d
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user