summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/io/resource_loader.cpp3
-rw-r--r--core/variant_op.cpp3
-rw-r--r--core/vmap.h6
3 files changed, 10 insertions, 2 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 3bae6be83c..13dac6ed16 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -192,6 +192,7 @@ RES ResourceLoader::load(const String &p_path,const String& p_type_hint,bool p_n
res->set_last_modified_time(mt);
}
#endif
+ print_line("LOADED: "+res->get_path());
return res;
}
@@ -246,7 +247,7 @@ String ResourceLoader::find_complete_path(const String& p_path,const String& p_t
String path = local_path+E->get();
- if (FileAccess::exists(path)) {
+ if (PathRemap::get_singleton()->has_remap(path) || FileAccess::exists(path)) {
candidates.push_back(path);
}
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 109e4ab387..50908bbf94 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -1319,7 +1319,7 @@ void Variant::set(const Variant& p_index, const Variant& p_value, bool *r_valid)
return;
int type=p_value;
- if (type<0 || type>=6)
+ if (type<0 || type>=InputEvent::TYPE_MAX)
return; //fail
valid=true;
ie.type=InputEvent::Type(type);
@@ -2765,6 +2765,7 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
InputEvent ie = operator InputEvent();
+
p_list->push_back( PropertyInfo(Variant::INT,"type"));
p_list->push_back( PropertyInfo(Variant::INT,"device"));
p_list->push_back( PropertyInfo(Variant::INT,"ID"));
diff --git a/core/vmap.h b/core/vmap.h
index c6c3d50bc7..516299280b 100644
--- a/core/vmap.h
+++ b/core/vmap.h
@@ -142,6 +142,12 @@ public:
}
+ int find_nearest(const T& p_val) const {
+
+ bool exact;
+ return _find(p_val,exact);
+
+ }
_FORCE_INLINE_ int size() const { return _data.size(); }
_FORCE_INLINE_ bool empty() const { return _data.empty(); }