Skip to content

Commit

Permalink
Fix branch placement bug in modded cells
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaakma committed Jun 17, 2023
1 parent 40d7603 commit 74f251a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Data Files/MWSE/mods/mer/ashfall/branch/branches.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ end

local cell_list
--local ignore_list
local function addBranchesToTree(tree)
local function addBranchesToTree(tree, cell)

--Select a branch mesh based on region
local branchGroup = getBranchGroup(tree)

Expand Down Expand Up @@ -158,7 +159,7 @@ local function addBranchesToTree(tree)
object = choice,
position = position,
orientation = {0, 0, 0},
cell = tree.cell,
cell = cell,
scale = scale
}
--Drop and orient the branch on the ground
Expand Down Expand Up @@ -215,7 +216,7 @@ local function addBranchesToCell(cell)
for reference in cell:iterateReferences(tes3.objectType.static) do
if isSource(reference) then
logger:debug("Adding branches to %s", reference.object.id)
addBranchesToTree(reference)
addBranchesToTree(reference, cell)
end
end
end
Expand Down

0 comments on commit 74f251a

Please sign in to comment.