Fixed nested if block in USandSlabs.pas

This commit is contained in:
Stefan Müller 2024-06-26 21:16:02 +02:00
parent 5441700572
commit 00f90a1da9
1 changed files with 4 additions and 6 deletions

View File

@ -230,13 +230,11 @@ begin
end;
// Updates disintegration flag.
if ABrick.SupportBricks.Count = 1 then
if (ABrick.SupportBricks.Count = 1)
and ABrick.SupportBricks[0].IsDisintegratable then
begin
if ABrick.SupportBricks[0].IsDisintegratable then
begin
ABrick.SupportBricks[0].IsDisintegratable := False;
Dec(FPart1);
end;
ABrick.SupportBricks[0].IsDisintegratable := False;
Dec(FPart1);
end;
for i := 0 to ABrick.SupportBricks.Count - 1 do
ABrick.SupportBricks[i].AddTopBrick(ABrick);