summaryrefslogtreecommitdiff
path: root/core/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/resource.cpp')
-rw-r--r--core/resource.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/resource.cpp b/core/resource.cpp
index 3078eb135a..4dcd338e94 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -30,11 +30,12 @@
#include "resource.h"
-#include "core_string_names.h"
-#include "io/resource_loader.h"
-#include "os/file_access.h"
+#include "core/core_string_names.h"
+#include "core/io/resource_loader.h"
+#include "core/os/file_access.h"
+#include "core/script_language.h"
#include "scene/main/node.h" //only so casting works
-#include "script_language.h"
+
#include <stdio.h>
void Resource::emit_changed() {
@@ -230,7 +231,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) const {
Variant p = get(E->get().name);
if ((p.get_type() == Variant::DICTIONARY || p.get_type() == Variant::ARRAY)) {
- p = p.duplicate(p_subresources); //does not make a long of sense but should work?
+ r->set(E->get().name, p.duplicate(p_subresources));
} else if (p.get_type() == Variant::OBJECT && (p_subresources || (E->get().usage & PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE))) {
RES sr = p;