Skip to content

Commit

Permalink
Fog rebuilding fix during move attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
cvet committed Apr 6, 2024
1 parent 34215ff commit 5b09621
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions Source/Client/Client.cpp
Expand Up @@ -1824,9 +1824,6 @@ void FOClient::Net_OnCritterTeleport()
}

CurMap->ScrollToHex(cr->GetHexX(), cr->GetHexY(), 0.1f, false);

// Maybe changed some parameter influencing on look borders
CurMap->RebuildFog();
}
}

Expand Down
6 changes: 1 addition & 5 deletions Source/Client/CritterHexView.cpp
Expand Up @@ -793,11 +793,7 @@ void CritterHexView::ProcessMoving()

const auto cur_hx = GetHexX();
const auto cur_hy = GetHexY();
const auto moved = (cur_hx != old_hx || cur_hy != old_hy);

if (moved && GetIsChosen()) {
_map->RebuildFog();
}
const auto moved = cur_hx != old_hx || cur_hy != old_hy;

// Evaluate current position
const auto cr_hx = GetHexX();
Expand Down
4 changes: 4 additions & 0 deletions Source/Client/MapView.cpp
Expand Up @@ -3712,6 +3712,10 @@ void MapView::MoveCritter(CritterHexView* cr, uint16 hx, uint16 hy, bool smoothl
}

AddCritterToField(cr);

if (cr->GetIsChosen()) {
RebuildFog();
}
}

void MapView::SetMultihexCritter(CritterHexView* cr, bool set)
Expand Down

0 comments on commit 5b09621

Please sign in to comment.