diff options
| author | Juan Linietsky | 2015-04-18 16:33:31 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-04-18 16:33:31 -0300 |
| commit | a5cbfbbcbbc8bc2dabc7ab166c09d116861f3cfd (patch) | |
| tree | 41084fb9fdd29c12f2e6f3f52412cb24fd7dfb69 | |
| parent | 170a9349d2f1b07d4562ac0992a0da59b9a28088 (diff) | |
| download | godot-a5cbfbbcbbc8bc2dabc7ab166c09d116861f3cfd.tar.gz godot-a5cbfbbcbbc8bc2dabc7ab166c09d116861f3cfd.tar.zst godot-a5cbfbbcbbc8bc2dabc7ab166c09d116861f3cfd.zip | |
-fixed relative path saving to file, fixes #1694
| -rw-r--r-- | core/io/resource_format_binary.cpp | 2 | ||||
| -rw-r--r-- | core/io/resource_format_xml.cpp | 6 | ||||
| -rw-r--r-- | drivers/gles2/shaders/canvas.glsl | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index f5ef40219..3d7d2f236 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -390,7 +390,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant& r_v) { if (path.find("://")==-1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - path=Globals::get_singleton()->localize_path(res_path.get_base_dir()+"/"+path); + path=Globals::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path)); } diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp index e635dc52f..50b1eba6e 100644 --- a/core/io/resource_format_xml.cpp +++ b/core/io/resource_format_xml.cpp @@ -458,7 +458,7 @@ Error ResourceInteractiveLoaderXML::parse_property(Variant& r_v, String &r_name) path=path.replace("local://",local_path+"::"); else if (path.find("://")==-1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - path=Globals::get_singleton()->localize_path(local_path.get_base_dir()+"/"+path); + path=Globals::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path)); } @@ -1423,7 +1423,7 @@ Error ResourceInteractiveLoaderXML::poll() { if (path.find("://")==-1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - path=Globals::get_singleton()->localize_path(local_path.get_base_dir()+"/"+path); + path=Globals::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path)); } @@ -1601,7 +1601,7 @@ void ResourceInteractiveLoaderXML::get_dependencies(FileAccess *f,List<String> * if (path.find("://")==-1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - path=Globals::get_singleton()->localize_path(local_path.get_base_dir()+"/"+path); + path=Globals::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path)); } if (path.ends_with("*")) { diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index c4f084787..65e40f069 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -296,7 +296,7 @@ LIGHT_SHADER_CODE } - highp vec4 s = shadow_matrix * highp vec4(point,0.0,1.0); + highp vec4 s = shadow_matrix * vec4(point,0.0,1.0); s.xyz/=s.w; su=s.x*0.5+0.5; sz=s.z*0.5+0.5; |
