Fix RCS1061

This commit is contained in:
RoosterDragon
2023-03-18 12:16:52 +00:00
committed by Gustas
parent 5d91b678bb
commit 4dd787be13
32 changed files with 167 additions and 210 deletions

View File

@@ -441,14 +441,12 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
// Only import the top-left cell of multi-celled overlays
// Returning true here means this is a part of a bigger overlay that has already been handled.
var aboveType = overlayPack[overlayIndex[cell - new CVec(1, 0)]];
if (shape.Width > 1 && aboveType != 0xFF)
if (OverlayToActor.TryGetValue(aboveType, out var a) && a == actorType)
return true;
if (shape.Width > 1 && aboveType != 0xFF && OverlayToActor.TryGetValue(aboveType, out var a) && a == actorType)
return true;
var leftType = overlayPack[overlayIndex[cell - new CVec(0, 1)]];
if (shape.Height > 1 && leftType != 0xFF)
if (OverlayToActor.TryGetValue(leftType, out var a) && a == actorType)
return true;
if (shape.Height > 1 && leftType != 0xFF && OverlayToActor.TryGetValue(leftType, out var l) && l == actorType)
return true;
}
actorReference = new ActorReference(actorType)