Skip to content

Commit 94512d5

Browse files
committed
Remove the logic to update Troll's Bridge passability after visiting it
Not sure what was it for but in the original game the passability doesn't change.
1 parent ae78f6e commit 94512d5

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

src/fheroes2/ai/ai_hero_action.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,6 @@ namespace
14791479

14801480
// Set ownership of the dwelling to a Neutral (gray) player so that any player can recruit troops without a fight.
14811481
setColorOnTile( tile, Color::UNUSED );
1482-
tile.SetObjectPassable( true );
14831482
}
14841483
else {
14851484
AIBattleLose( hero, res, true );

src/fheroes2/heroes/heroes_action.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,6 @@ namespace
24662466

24672467
// Set ownership of the dwelling to a Neutral (gray) player so that any player can recruit troops without a fight.
24682468
setColorOnTile( tile, Color::UNUSED );
2469-
tile.SetObjectPassable( true );
24702469

24712470
if ( fheroes2::showStandardTextMessage( title, victoryMsg, Dialog::YES | Dialog::NO ) == Dialog::YES ) {
24722471
const Troop troop = getTroopFromTile( tile );

src/fheroes2/maps/maps_tiles.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,18 +1085,6 @@ bool Maps::Tile::isPassableFrom( const int direction, const bool fromWater, cons
10851085
return ( direction & _tilePassabilityDirections ) != 0;
10861086
}
10871087

1088-
void Maps::Tile::SetObjectPassable( bool pass )
1089-
{
1090-
if ( getMainObjectType( false ) == MP2::OBJ_TROLL_BRIDGE ) {
1091-
if ( pass ) {
1092-
_tilePassabilityDirections |= Direction::TOP_LEFT;
1093-
}
1094-
else {
1095-
_tilePassabilityDirections &= ~Direction::TOP_LEFT;
1096-
}
1097-
}
1098-
}
1099-
11001088
bool Maps::Tile::isStream() const
11011089
{
11021090
for ( const auto & part : _groundObjectPart ) {

src/fheroes2/maps/maps_tiles.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ namespace Maps
283283

284284
void ClearFog( const int colors );
285285

286-
void SetObjectPassable( bool pass );
287-
288286
const std::array<uint32_t, 3> & metadata() const
289287
{
290288
return _metadata;

0 commit comments

Comments
 (0)