FreeRect

Category: Landscape
Since engine version: 4.6.5.0 CP (extended in 4.9.5.0 CE)

Description

Removes all material within the specified rectangle. Coordinates are always global. Excluding the right and lower limits of the rectangle.

Syntax

void FreeRect (int iX, int iY, int iWdt, int iHgt, int iFreeDensity);

Parameters

iX:
Left limit of the rectangle
iY:
Top limit of the rectangle
iWdt:
Width of the rectangle
iHgt:
Height of the rectangle
iFreeDensity:
If specified, material of the specified density is removed

Remark

This call may take quite a while for large rectangles.

Example

FreeRect(0, 0, LandscapeWidth(), LandscapeHeight());
Empties the complete landscape.
See also: DigFree, DigFreeRect, Explode
Sven2, November 2001
Clonkonaut, April 2008