mirror of
https://github.com/ihhub/fheroes2.git
synced 2026-10-11 21:59:51 +00:00
Remove the logic to update Troll's Bridge passability after visiting it (#9420)
This commit is contained in:
@@ -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 <[email protected]> *
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 <[email protected]> *
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -283,8 +283,6 @@ namespace Maps
|
||||
|
||||
void ClearFog( const int colors );
|
||||
|
||||
void SetObjectPassable( bool pass );
|
||||
|
||||
const std::array<uint32_t, 3> & metadata() const
|
||||
{
|
||||
return _metadata;
|
||||
|
||||
Reference in New Issue
Block a user