Skip to content

Commit

Permalink
Paraphrase some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-derevenetz committed Jan 2, 2025
1 parent b8360a1 commit 7b2231a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fheroes2/maps/maps_tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,16 +735,16 @@ void Maps::Tile::updatePassability()
return;
}

// Check a tile below which can affect the passability.
// Check the tile located below the object, which may affect the passability.
if ( !isValidDirection( _index, Direction::BOTTOM ) ) {
// This object "touches" the bottom part of the map. Mark is as inaccessible.
_tilePassabilityDirections = 0;
return;
}

const Tile & bottomTile = world.getTile( GetDirectionIndex( _index, Direction::BOTTOM ) );
// If an object locates on land and the below tile is water, mark the current tile as impassable.
// It's done for cases that a hero won't be able to disembark on the tile.
// If an object locates on land and the tile below it is a water tile, then mark the current tile as impassable.
// It's done for cases when a hero won't be able to disembark on the tile.
if ( !isWater() && bottomTile.isWater() ) {
_tilePassabilityDirections = 0;
return;
Expand Down

0 comments on commit 7b2231a

Please sign in to comment.