Skip to content

Commit 9567b22

Browse files
committed
chore(heightmap): Remove useless logic in HeightMapRenderObjClass::updateCenter() (#2677)
1 parent d776595 commit 9567b22

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

Core/GameEngineDevice/Source/W3DDevice/GameClient/HeightMap.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,22 +1751,10 @@ void HeightMapRenderObjClass::updateCenter(CameraClass *camera , RefRenderObjLis
17511751

17521752
if (m_map) {
17531753
Int newOrgX;
1754-
if (visMaxX-visMinX > m_x) {
1755-
newOrgX = (maxX+minX)/2-m_x/2.0;
1756-
} else {
1757-
newOrgX = (visMaxX+visMinX)/2-m_x/2.0;
1758-
}
1759-
17601754
Int newOrgY;
1761-
if (visMaxY - visMinY > m_y) {
1762-
newOrgY = visMinY+1;
1763-
} else {
1764-
newOrgY = (visMaxY+visMinY)/2-m_y/2.0;
1765-
}
1766-
if (TheTacticalView->getFieldOfView() != 0) {
1767-
newOrgX = (visMaxX+visMinX)/2-m_x/2.0;
1768-
newOrgY = (visMaxY+visMinY)/2-m_y/2.0;
1769-
}
1755+
newOrgX = (visMaxX+visMinX)/2 - m_x/2.0;
1756+
newOrgY = (visMaxY+visMinY)/2 - m_y/2.0;
1757+
17701758
Int deltaX = newOrgX - m_map->getDrawOrgX();
17711759
Int deltaY = newOrgY - m_map->getDrawOrgY();
17721760
if (IABS(deltaX) > m_x/2 || IABS(deltaY)>m_x/2) {

0 commit comments

Comments
 (0)