diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 1 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 7 | ||||
-rw-r--r-- | servers/visual_server.cpp | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index 45310ec4b3..0eb22c2520 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -1079,6 +1079,7 @@ Physics2DDirectBodyState *Physics2DServerSW::body_get_direct_state(RID p_body) { Body2DSW *body = body_owner.get(p_body); ERR_FAIL_COND_V(!body, NULL); + ERR_FAIL_COND_V(!body->get_space(), NULL); if (body->get_space()->is_locked()) { diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 1acec7ccaf..628ffb71f3 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -525,7 +525,6 @@ ShaderLanguage::Token ShaderLanguage::_get_token() { bool exponent_found = false; bool hexa_found = false; bool sign_found = false; - bool minus_exponent_found = false; bool float_suffix_found = false; String str; @@ -557,8 +556,6 @@ ShaderLanguage::Token ShaderLanguage::_get_token() { if (sign_found) return _make_token(TK_ERROR, "Invalid numeric constant"); sign_found = true; - if (GETCHAR(i) == '-') - minus_exponent_found = true; } else break; @@ -571,7 +568,7 @@ ShaderLanguage::Token ShaderLanguage::_get_token() { if (hexa_found) { //hex integers eg."0xFF" or "0x12AB", etc - NOT supported yet return _make_token(TK_ERROR, "Invalid (hexadecimal) numeric constant - Not supported"); - } else if (period_found || float_suffix_found) { + } else if (period_found || exponent_found || float_suffix_found) { //floats if (period_found) { if (float_suffix_found) { @@ -614,7 +611,7 @@ ShaderLanguage::Token ShaderLanguage::_get_token() { char_idx += str.length(); Token tk; - if (period_found || minus_exponent_found || float_suffix_found) + if (period_found || exponent_found || float_suffix_found) tk.type = TK_REAL_CONSTANT; else tk.type = TK_INT_CONSTANT; diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index a92e4efcd6..acc6774019 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1924,7 +1924,7 @@ void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("scenario_create"), &VisualServer::scenario_create); ClassDB::bind_method(D_METHOD("scenario_set_debug", "scenario", "debug_mode"), &VisualServer::scenario_set_debug); ClassDB::bind_method(D_METHOD("scenario_set_environment", "scenario", "environment"), &VisualServer::scenario_set_environment); - ClassDB::bind_method(D_METHOD("scenario_set_reflection_atlas_size", "scenario", "p_size", "subdiv"), &VisualServer::scenario_set_reflection_atlas_size); + ClassDB::bind_method(D_METHOD("scenario_set_reflection_atlas_size", "scenario", "size", "subdiv"), &VisualServer::scenario_set_reflection_atlas_size); ClassDB::bind_method(D_METHOD("scenario_set_fallback_environment", "scenario", "environment"), &VisualServer::scenario_set_fallback_environment); #ifndef _3D_DISABLED |