mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'isse/fix-tree-crowding' into 'master'
Use column sample for tree for crowding value See merge request veloren/veloren!4445
This commit is contained in:
commit
d934419742
@ -87,7 +87,6 @@ pub fn apply_trees_to(
|
|||||||
canvas.foreach_col(|canvas, wpos2d, col| {
|
canvas.foreach_col(|canvas, wpos2d, col| {
|
||||||
let trees = tree_cache.get(wpos2d, |wpos, seed| {
|
let trees = tree_cache.get(wpos2d, |wpos, seed| {
|
||||||
let scale = 1.0;
|
let scale = 1.0;
|
||||||
let crowding = col.tree_density;
|
|
||||||
let inhabited = false;
|
let inhabited = false;
|
||||||
let forest_kind = *info
|
let forest_kind = *info
|
||||||
.chunks()
|
.chunks()
|
||||||
@ -97,6 +96,8 @@ pub fn apply_trees_to(
|
|||||||
|
|
||||||
let col = ColumnGen::new(info.chunks()).get((wpos, info.index(), calendar))?;
|
let col = ColumnGen::new(info.chunks()).get((wpos, info.index(), calendar))?;
|
||||||
|
|
||||||
|
let crowding = col.tree_density;
|
||||||
|
|
||||||
if !tree_valid_at(wpos, &col, Some(info), seed) {
|
if !tree_valid_at(wpos, &col, Some(info), seed) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user