diff --git a/src/fheroes2/ai/ai_hero_action.cpp b/src/fheroes2/ai/ai_hero_action.cpp index a2b6bcf07..44911f931 100644 --- a/src/fheroes2/ai/ai_hero_action.cpp +++ b/src/fheroes2/ai/ai_hero_action.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * fheroes2: https://github.com/ihhub/fheroes2 * - * Copyright (C) 2019 - 2024 * + * Copyright (C) 2019 - 2025 * * * * Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 * * Copyright (C) 2010 by Andrey Afletdinov * @@ -1479,7 +1479,6 @@ namespace // Set ownership of the dwelling to a Neutral (gray) player so that any player can recruit troops without a fight. setColorOnTile( tile, Color::UNUSED ); - tile.SetObjectPassable( true ); } else { AIBattleLose( hero, res, true ); diff --git a/src/fheroes2/heroes/heroes_action.cpp b/src/fheroes2/heroes/heroes_action.cpp index 0388cbffc..03801a032 100644 --- a/src/fheroes2/heroes/heroes_action.cpp +++ b/src/fheroes2/heroes/heroes_action.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * fheroes2: https://github.com/ihhub/fheroes2 * - * Copyright (C) 2019 - 2024 * + * Copyright (C) 2019 - 2025 * * * * Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 * * Copyright (C) 2009 by Andrey Afletdinov * @@ -2466,7 +2466,6 @@ namespace // Set ownership of the dwelling to a Neutral (gray) player so that any player can recruit troops without a fight. setColorOnTile( tile, Color::UNUSED ); - tile.SetObjectPassable( true ); if ( fheroes2::showStandardTextMessage( title, victoryMsg, Dialog::YES | Dialog::NO ) == Dialog::YES ) { const Troop troop = getTroopFromTile( tile ); diff --git a/src/fheroes2/maps/maps_tiles.cpp b/src/fheroes2/maps/maps_tiles.cpp index e508dc2ab..7564ce17c 100644 --- a/src/fheroes2/maps/maps_tiles.cpp +++ b/src/fheroes2/maps/maps_tiles.cpp @@ -1085,18 +1085,6 @@ bool Maps::Tile::isPassableFrom( const int direction, const bool fromWater, cons return ( direction & _tilePassabilityDirections ) != 0; } -void Maps::Tile::SetObjectPassable( bool pass ) -{ - if ( getMainObjectType( false ) == MP2::OBJ_TROLL_BRIDGE ) { - if ( pass ) { - _tilePassabilityDirections |= Direction::TOP_LEFT; - } - else { - _tilePassabilityDirections &= ~Direction::TOP_LEFT; - } - } -} - bool Maps::Tile::isStream() const { for ( const auto & part : _groundObjectPart ) { diff --git a/src/fheroes2/maps/maps_tiles.h b/src/fheroes2/maps/maps_tiles.h index 14378b50b..9f0628bcf 100644 --- a/src/fheroes2/maps/maps_tiles.h +++ b/src/fheroes2/maps/maps_tiles.h @@ -283,8 +283,6 @@ namespace Maps void ClearFog( const int colors ); - void SetObjectPassable( bool pass ); - const std::array & metadata() const { return _metadata;