Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MapLoading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ void readBlockToSegment(DFHack::Core& DF, WorldSegment& segment,

namespace
{
void parse_tree(WorldSegment& segment, auto pp, auto info, auto parts, auto depth, bool downward, auto raw)
void parse_tree(WorldSegment& segment, df::plant *pp, df::plant_tree_info *info, auto parts, int32_t depth, bool downward, df::plant_raw *raw)
{
for (int zz = 0; zz < depth; zz++)
{
Expand All @@ -663,7 +663,7 @@ namespace
df::coord pos = pp->pos;
pos.x = pos.x - (info->dim_x / 2) + xx;
pos.y = pos.y - (info->dim_y / 2) + yy;
pos.z = pos.z + downward ? zz : (-1 - zz);
pos.z = pos.z + (downward ? (-1 - zz) : zz);
if (!segment.CoordinateInsideSegment(pos.x, pos.y, pos.z))
continue;
Tile* t = segment.getTile(pos.x, pos.y, pos.z);
Expand All @@ -674,7 +674,7 @@ namespace
t->tree.type = pp->type;
t->tree.index = pp->material;
// only update tree_tile if part is a plant_tree_tile
if constexpr (std::assignable_from<decltype(t->tree_tile), decltype(part)>)
if constexpr (std::assignable_from<decltype(t->tree_tile)&, decltype(part)>)
{
t->tree_tile = part;
if (raw)
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Template for new versions:

## Fixes
- `stonesense`: fixed a crash when rendering materials with an out-of-range color index
- `stonesense`: fixed tree materials not being applied correctly

## Misc Improvements

Expand Down
Loading