Ver Fonte

Cursor: show battle cursor for garrison if there creature behind

This one fixed issue 1563
ArseniyShestakov há 10 anos atrás
pai
commit
a6ce45e867
1 ficheiros alterados com 4 adições e 3 exclusões
  1. 4 3
      client/windows/CAdvmapInterface.cpp

+ 4 - 3
client/windows/CAdvmapInterface.cpp

@@ -1604,9 +1604,10 @@ void CAdvMapInt::tileHovered(const int3 &mapPos)
 				{
 					const CGGarrison* garrObj = dynamic_cast<const CGGarrison*>(objAtTile); //TODO evil evil cast!
 
-					// Show battle cursor for guarded enemy garrisons, otherwise movement cursor.
-					if (garrObj  &&  garrObj->stacksCount()
-						&& !LOCPLINT->cb->getPlayerRelations( LOCPLINT->playerID, garrObj->tempOwner) )
+					// Show battle cursor for guarded enemy garrisons or garrisons have guarding creature behind, otherwise movement cursor.
+					if (garrObj  &&  ((garrObj->stacksCount()
+						&& !LOCPLINT->cb->getPlayerRelations( LOCPLINT->playerID, garrObj->tempOwner))
+						|| guardingCreature))
 						CCS->curh->changeGraphic(ECursor::ADVENTURE, 5 + turns*6);
 					else
 						CCS->curh->changeGraphic(ECursor::ADVENTURE, 9 + turns*6);