diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics/shape_sw.cpp | 2 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp index 10500a306f..dec1c75d9f 100644 --- a/servers/physics/shape_sw.cpp +++ b/servers/physics/shape_sw.cpp @@ -181,7 +181,7 @@ void RayShapeSW::get_supports(const Vector3& p_normal,int p_max,Vector3 *r_suppo r_amount=2; r_supports[0]=Vector3(0,0,0); r_supports[1]=Vector3(0,0,length); - } if (p_normal.z>0) { + } else if (p_normal.z>0) { r_amount=1; *r_supports=Vector3(0,0,length); } else { diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 7dfd9822f7..c680013efa 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -307,7 +307,7 @@ ShaderLanguage::Token ShaderLanguage::_get_token() { } if (GETCHAR(0)=='*' && GETCHAR(1)=='/') { char_idx+=2; break; - } if (GETCHAR(0)=='\n') { + } else if (GETCHAR(0)=='\n') { tk_line++; } @@ -3241,7 +3241,7 @@ Error ShaderLanguage::_parse_shader(const Map< StringName, Map<StringName,DataTy _set_error("void datatype not allowed here"); return ERR_PARSE_ERROR; } - if (!uniform && type<TYPE_FLOAT && type>TYPE_VEC4) { + if (!uniform && type<TYPE_FLOAT && type>TYPE_VEC4) { // FIXME: always false! should it be || instead? _set_error("Invalid type for varying, only float,vec2,vec3,vec4 allowed."); return ERR_PARSE_ERROR; } |