mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
client: do not show obstacles placed by another player
This commit is contained in:
@@ -78,6 +78,11 @@ void BattleObstacleController::obstaclePlaced(const std::vector<std::shared_ptr<
|
|||||||
{
|
{
|
||||||
for (auto const & oi : obstacles)
|
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());
|
auto spellObstacle = dynamic_cast<const SpellCreatedObstacle*>(oi.get());
|
||||||
|
|
||||||
if (!spellObstacle)
|
if (!spellObstacle)
|
||||||
|
Reference in New Issue
Block a user