Skip to content

Commit c55e64c

Browse files
committed
chore: Apply fix to retail for radii below 240
1 parent b32c2e4 commit c55e64c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,9 +1859,10 @@ void PartitionData::doCircleFill(
18591859
Int dec = 3 - 2*cellRadius;
18601860

18611861
#if RETAIL_COMPATIBLE_CRC
1862-
for (Int x = 0; x < cellRadius; x++)
1862+
// Cell coverage diverges at radii >= 240 between algorithms.
1863+
for (Int x = 0; (cellRadius < 240) ? (x <= y) : (x < cellRadius); ++x)
18631864
#else
1864-
for (Int x = 0; x <= y; x++)
1865+
for (Int x = 0; x <= y; ++x)
18651866
#endif
18661867
{
18671868
hLineCircle(cellCenterX - x, cellCenterX + x, cellCenterY + y);

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,9 +1863,10 @@ void PartitionData::doCircleFill(
18631863
Int dec = 3 - 2*cellRadius;
18641864

18651865
#if RETAIL_COMPATIBLE_CRC
1866-
for (Int x = 0; x < cellRadius; x++)
1866+
// Cell coverage diverges at radii >= 240 between algorithms.
1867+
for (Int x = 0; (cellRadius < 240) ? (x <= y) : (x < cellRadius); ++x)
18671868
#else
1868-
for (Int x = 0; x <= y; x++)
1869+
for (Int x = 0; x <= y; ++x)
18691870
#endif
18701871
{
18711872
hLineCircle(cellCenterX - x, cellCenterX + x, cellCenterY + y);

0 commit comments

Comments
 (0)