forked from Mirrors/openclonk
Bugfix: Trees seed wrongly.
The trees actually seeded at a very wrong place in case the property "Confinement" was not set: The area.x, area.y, area.w, area.h coordinates were specified as global coordinates, but were used as offset coordinates in PlaceVegetation. This leads to the trees seeding underground, too, unfortunately.liquid_container
parent
b6b5f5a79f
commit
9cb261aac8
|
@ -149,8 +149,13 @@ private func DoSeed()
|
|||
area = confined_area->GetBoundingRectangle();
|
||||
if (area.w <= 0 || area.h <= 0) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Place the new plant in the original area
|
||||
confined_area = area;
|
||||
}
|
||||
// Place the plant...
|
||||
var plant = PlaceVegetation(GetID(), area.x, area.y, area.w, area.h, 3, confined_area);
|
||||
var plant = PlaceVegetation(GetID(), 0, 0, 0, 0, 3, confined_area);
|
||||
if (plant)
|
||||
{
|
||||
// ...but check if it is not close to another one.
|
||||
|
|
Loading…
Reference in New Issue