From a862e4290c8ddffbcbb1c03291bd571109aef8b4 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 17 Mar 2024 17:32:35 +0100 Subject: [PATCH] Script API: Fix invalid rotation of L-system trees The MapNode struct fields param1 and param2 were previously not initialized. This commit now sets them to a sane default. --- src/mapgen/treegen.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mapgen/treegen.h b/src/mapgen/treegen.h index 5ba1cc10c..bae541030 100644 --- a/src/mapgen/treegen.h +++ b/src/mapgen/treegen.h @@ -36,6 +36,13 @@ namespace treegen { }; struct TreeDef : public NodeResolver { + TreeDef() : + // Initialize param1 and param2 + trunknode(CONTENT_IGNORE), + leavesnode(CONTENT_IGNORE), + leaves2node(CONTENT_IGNORE), + fruitnode(CONTENT_IGNORE) + {} virtual void resolveNodeNames(); std::string initial_axiom;