mirror of
https://github.com/kwsch/NHSE.git
synced 2026-10-01 06:16:38 -05:00
Clear viewport item node on skip
When jumping viewports, pixels from the previous viewport weren't being wiped
This commit is contained in:
@@ -108,13 +108,15 @@ private static void LoadViewport(LayerItem layer, in LayerPositionConfig cfg, Sp
|
||||
var tileY = relY + y;
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
var index = baseIndex + x;
|
||||
var tileX = relX + x;
|
||||
if (!cfg.IsCoordinateValidRelative(tileX, tileY))
|
||||
{
|
||||
data[index] = 0;
|
||||
continue;
|
||||
}
|
||||
var tile = layer.GetTile(tileX, tileY);
|
||||
var color = FieldItemColor.GetItemColor(tile).ToArgb();
|
||||
|
||||
var index = baseIndex + x;
|
||||
data[index] = color;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user