Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 8aca379

Browse files
committed
Check edgecase of 1-pixel thickness
1 parent 04d32fb commit 8aca379

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Entities/AtomGroup.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ namespace RTE {
15631563
// Scan RIGHT to LEFT, placing one Atom on each first encountered silhouette edge
15641564
for (x = spriteWidth - 1; x >= 0; --x) {
15651565
// Detect if we are crossing a silhouette boundary.
1566-
if (getpixel(refSprite, x, y) != g_MaskColor) {
1566+
if (getpixel(refSprite, x, y) != g_MaskColor && getpixel(checkBitmap, x, y) == g_MaskColor) {
15671567
// Mark that an Atom has been put in this location, to avoid duplicate Atoms
15681568
putpixel(checkBitmap, x, y, 99);
15691569
AddAtomToGroup(ownerMOSRotating, spriteOffset, x, y, true);
@@ -1578,6 +1578,7 @@ namespace RTE {
15781578
for (y = 0; y < spriteHeight; ++y) {
15791579
// Detect if we are crossing a silhouette boundary, but make sure Atom wasn't already placed during the horizontal scans.
15801580
if (getpixel(refSprite, x, y) != g_MaskColor && getpixel(checkBitmap, x, y) == g_MaskColor) {
1581+
putpixel(checkBitmap, x, y, 99);
15811582
AddAtomToGroup(ownerMOSRotating, spriteOffset, x, y, true);
15821583
break;
15831584
}

0 commit comments

Comments
 (0)