1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

client: do not show obstacles placed by another player

This commit is contained in:
Konstantin 2023-03-21 01:22:31 +03:00
parent edc9812559
commit 1b893fa525

View File

@ -78,6 +78,11 @@ void BattleObstacleController::obstaclePlaced(const std::vector<std::shared_ptr<
{
for (auto const & oi : obstacles)
{
auto side = owner.curInt->cb->playerToSide(owner.curInt->playerID);
if(!oi->visibleForSide(side.get(),owner.curInt->cb->battleHasNativeStack(side.get())))
continue;
auto spellObstacle = dynamic_cast<const SpellCreatedObstacle*>(oi.get());
if (!spellObstacle)