🐛 Add half of the dominant slope to effective altitude
The altitude helper halved the smaller delta instead of the dominant one, miscalculating draw priorities on every diagonal slope.
This commit is contained in:
@@ -1075,10 +1075,10 @@ begin
|
||||
south := GetLandAlt(ATile.X + 1, ATile.Y + 1, north);
|
||||
east := GetLandAlt(ATile.X + 1, ATile.Y, north);
|
||||
|
||||
if Abs(north - south) >= Abs(west - east) then
|
||||
Result := Min(north, south) + Abs(west - east) div 2
|
||||
if Abs(north - south) > Abs(west - east) then
|
||||
Result := Min(north, south) + Abs(north - south) div 2
|
||||
else
|
||||
Result := Min(north, south) + Abs(north - south) div 2;
|
||||
Result := Min(north, south) + Abs(west - east) div 2;
|
||||
end;
|
||||
|
||||
function TLandscape.GetLandAlt(AX, AY: Word; ADefault: ShortInt): ShortInt;
|
||||
|
||||
Reference in New Issue
Block a user