mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix cursor on visiting sea objects from land
This commit is contained in:
parent
c839b397e8
commit
b9f4c557fa
@ -691,7 +691,7 @@ void AdventureMapInterface::onTileHovered(const int3 &mapPos)
|
||||
if(pathNode->layer == EPathfindingLayer::LAND)
|
||||
CCS->curh->set(cursorMove[turns]);
|
||||
else
|
||||
CCS->curh->set(cursorSailVisit[turns]);
|
||||
CCS->curh->set(cursorSail[turns]);
|
||||
break;
|
||||
|
||||
case EPathNodeAction::VISIT:
|
||||
@ -706,6 +706,15 @@ void AdventureMapInterface::onTileHovered(const int3 &mapPos)
|
||||
}
|
||||
else if(pathNode->layer == EPathfindingLayer::LAND)
|
||||
CCS->curh->set(cursorVisit[turns]);
|
||||
else if (pathNode->layer == EPathfindingLayer::SAIL &&
|
||||
objAtTile &&
|
||||
objAtTile->isCoastVisitable() &&
|
||||
pathNode->theNodeBefore &&
|
||||
pathNode->theNodeBefore->layer == EPathfindingLayer::LAND )
|
||||
{
|
||||
// exception - when visiting shipwreck located on coast from land - show 'horse' cursor, not 'ship' cursor
|
||||
CCS->curh->set(cursorVisit[turns]);
|
||||
}
|
||||
else
|
||||
CCS->curh->set(cursorSailVisit[turns]);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user