Skip to content

Commit 084d19e

Browse files
committed
Fixes an issue with importing elements from other resources
1 parent 2e86749 commit 084d19e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

[editor]/editor_main/client/elementcreation.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ function doCloneElement ( element, attachMode )
7979
if exports["editor_gui"]:sx_getOptionData("randomizeRotation") == true then
8080
rotationData = getRandomRotation()
8181
end
82-
triggerServerEvent( "doCloneElement", element, attachMode, rotationData )
82+
triggerServerEvent( "doCloneElement", element, attachMode, false, rotationData )
8383
end

[editor]/editor_main/server/createdestroy.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function setupNewElement(element, creatorResource, creatorClient, attachLater,sh
1919
makeElementStatic( element )
2020
assignID ( element )
2121
triggerEvent ( "onElementCreate_undoredo", element )
22-
if attachLater then
22+
if attachLater and creatorClient then
2323
setTimer(triggerClientEvent, WAIT_LOAD_INTERVAL, 1, creatorClient, "doSelectElement", element, selectionSubmode, shortcut )
2424
end
2525
justCreated[element] = true --mark it so undoredo ignores first placement
@@ -56,7 +56,7 @@ addEventHandler ( "doCreateElement", root,
5656
)
5757

5858
addEventHandler ( "doCloneElement", root,
59-
function (attachMode,rotationData,creator)
59+
function (attachMode, creator, rotationData)
6060
if client and not isPlayerAllowedToDoEditorAction(client,"createElement") then
6161
editor_gui.outputMessage ("You don't have permissions to clone an element!", client,255,0,0)
6262
return

0 commit comments

Comments
 (0)