Skip to content

Commit 03211a5

Browse files
authored
Update mapEditorScriptingExtension_s.lua
1 parent a380a41 commit 03211a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

[editor]/editor_main/server/mapEditorScriptingExtension_s.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ local function createLODObject(originalObject, lodModel)
4343
usedLODModels[lodModel] = true
4444
end
4545

46-
local function processAutoLOD(resource)
46+
local function processAutoLOD(resourceElement, resource)
4747
local resourceName = getResourceName(resource)
4848
local useLODs = get(resourceName .. ".useLODs")
4949

5050
if not useLODs then
5151
return
5252
end
5353

54-
local objectsTable = getElementsByType("object", resource)
54+
local objectsTable = getElementsByType("object", resourceElement)
5555

5656
for i = 1, #objectsTable do
5757
local objectElement = objectsTable[i]
@@ -64,12 +64,12 @@ local function processAutoLOD(resource)
6464
end
6565
end
6666

67-
local function onResourceStartOrStop(startedResource)
67+
local function onResourceStartOrStop(resource)
6868
local isStarting = eventName == "onResourceStart"
6969
processRemoveWorldObjects(source, isStarting)
7070

7171
if isStarting then
72-
processAutoLOD(startedResource)
72+
processAutoLOD(source, resource)
7373
end
7474
end
7575
addEventHandler("onResourceStart", resourceRoot, onResourceStartOrStop)

0 commit comments

Comments
 (0)