summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/error_list.h2
-rw-r--r--core/global_constants.cpp1
-rw-r--r--core/math/camera_matrix.cpp1
-rw-r--r--core/resource.cpp29
-rw-r--r--core/resource.h1
-rw-r--r--core/ustring.cpp2
6 files changed, 31 insertions, 5 deletions
diff --git a/core/error_list.h b/core/error_list.h
index 50d248b3d0..9a36b27aab 100644
--- a/core/error_list.h
+++ b/core/error_list.h
@@ -87,8 +87,6 @@ enum Error {
ERR_HELP, ///< user requested help!!
ERR_BUG, ///< a bug in the software certainly happened, due to a double check failing or unexpected behavior.
ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
- ERR_OMFG_THIS_IS_VERY_VERY_BAD, ///< shit happens, has never been used, though
- ERR_WTF = ERR_OMFG_THIS_IS_VERY_VERY_BAD ///< short version of the above
};
#endif
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 48101c8cf1..fb432b85db 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -491,7 +491,6 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUSY);
BIND_GLOBAL_ENUM_CONSTANT(ERR_HELP); ///< user requested help!!
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUG); ///< a bug in the software certainly happened ), due to a double check failing or unexpected behavior.
- BIND_GLOBAL_ENUM_CONSTANT(ERR_WTF);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_NONE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RANGE);
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp
index c5f1d57441..42d2d0373a 100644
--- a/core/math/camera_matrix.cpp
+++ b/core/math/camera_matrix.cpp
@@ -140,6 +140,7 @@ void CameraMatrix::set_for_hmd(int p_eye, real_t p_aspect, real_t p_intraocular_
real_t add = ((f1 + f2) * (p_oversample - 1.0)) / 2.0;
f1 += add;
f2 += add;
+ f3 *= p_oversample;
// always apply KEEP_WIDTH aspect ratio
f3 *= p_aspect;
diff --git a/core/resource.cpp b/core/resource.cpp
index 78e20bada4..d339eb78ad 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -184,6 +184,35 @@ Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Res
return Ref<Resource>(r);
}
+void Resource::configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource> > &remap_cache) {
+
+ print_line("configure for local: " + get_class());
+ List<PropertyInfo> plist;
+ get_property_list(&plist);
+
+ local_scene = p_for_scene;
+
+ for (List<PropertyInfo>::Element *E = plist.front(); E; E = E->next()) {
+
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE))
+ continue;
+ Variant p = get(E->get().name);
+ if (p.get_type() == Variant::OBJECT) {
+
+ RES sr = p;
+ if (sr.is_valid()) {
+
+ if (sr->is_local_to_scene()) {
+ if (!remap_cache.has(sr)) {
+ sr->configure_for_local_scene(p_for_scene, remap_cache);
+ remap_cache[sr] = sr;
+ }
+ }
+ }
+ }
+ }
+}
+
Ref<Resource> Resource::duplicate(bool p_subresources) const {
List<PropertyInfo> plist;
diff --git a/core/resource.h b/core/resource.h
index 7dc3b67291..19714a68d1 100644
--- a/core/resource.h
+++ b/core/resource.h
@@ -108,6 +108,7 @@ public:
virtual Ref<Resource> duplicate(bool p_subresources = false) const;
Ref<Resource> duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource> > &remap_cache);
+ void configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource> > &remap_cache);
void set_local_to_scene(bool p_enable);
bool is_local_to_scene() const;
diff --git a/core/ustring.cpp b/core/ustring.cpp
index a86fb46c8a..3a0708851e 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3380,8 +3380,6 @@ bool String::is_valid_float() const {
from++;
}
- //this was pulled out of my ass, i wonder if it's correct...
-
bool exponent_found = false;
bool period_found = false;
bool sign_found = false;