Skip to content
Open
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
4 changes: 2 additions & 2 deletions BehaviorTree3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,10 @@ local function ProcessNode(node, nodes)
local randomNode = addNode("random")
randomNode.indices = {}
for _,childNode in pairs(node.params.nodes) do
if childNode.weight then
if childNode.params.weight then
local base = #randomNode.indices
local index = #nodes + 1
for i = 1, childNode.weight do
for i = 1, childNode.params.weight do
randomNode.indices[base + i] = index
end
else
Expand Down