diff options
-rw-r--r-- | bin/tests/test_physics_2d.cpp | 4 | ||||
-rw-r--r-- | core/math/math_funcs.cpp | 4 | ||||
-rw-r--r-- | core/variant_op.cpp | 2 | ||||
-rw-r--r-- | drivers/unix/memory_pool_static_malloc.cpp | 2 | ||||
-rw-r--r-- | platform/android/export/export.cpp | 8 | ||||
-rw-r--r-- | scene/3d/mesh_instance.cpp | 4 | ||||
-rw-r--r-- | scene/animation/tween.cpp | 2 | ||||
-rw-r--r-- | scene/gui/scroll_bar.cpp | 16 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 2 | ||||
-rw-r--r-- | scene/resources/scene_preloader.cpp | 2 | ||||
-rw-r--r-- | servers/physics/joints/generic_6dof_joint_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d_server.cpp | 2 | ||||
-rw-r--r-- | servers/physics_server.cpp | 2 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 2 | ||||
-rw-r--r-- | tools/collada/collada.cpp | 2 | ||||
-rw-r--r-- | tools/editor/animation_editor.cpp | 2 | ||||
-rw-r--r-- | tools/editor/io_plugins/editor_sample_import_plugin.cpp | 4 |
17 files changed, 31 insertions, 31 deletions
diff --git a/bin/tests/test_physics_2d.cpp b/bin/tests/test_physics_2d.cpp index a441bed430..70a7d868be 100644 --- a/bin/tests/test_physics_2d.cpp +++ b/bin/tests/test_physics_2d.cpp @@ -191,7 +191,7 @@ class TestPhysics2DMainLoop : public MainLoop { Image image(convex_png); - body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].image=vs->texture_create_from_image(image); + body_shape_data[Physics2DServer::SHAPE_CUSTOM+1].image=vs->texture_create_from_image(image); RID convex_polygon_shape = ps->shape_create(Physics2DServer::SHAPE_CONVEX_POLYGON); @@ -206,7 +206,7 @@ class TestPhysics2DMainLoop : public MainLoop { arr.push_back(Point2(11,7)-sb); ps->shape_set_data(convex_polygon_shape,arr); - body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].shape = convex_polygon_shape; + body_shape_data[Physics2DServer::SHAPE_CUSTOM+1].shape = convex_polygon_shape; } diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp index 490e529d82..6ad5c7499b 100644 --- a/core/math/math_funcs.cpp +++ b/core/math/math_funcs.cpp @@ -48,8 +48,8 @@ uint32_t Math::rand_from_seed(uint32_t *seed) { s = 0x12345987; k = s / 127773; s = 16807 * (s - k * 127773) - 2836 * k; - if (s < 0) - s += 2147483647; +// if (s < 0) +// s += 2147483647; (*seed) = s; return (s & Math::RANDOM_MAX); #else diff --git a/core/variant_op.cpp b/core/variant_op.cpp index dafe3bd02d..f68652b8cc 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -2433,7 +2433,7 @@ Variant Variant::get(const Variant& p_index, bool *r_valid) const { } else if (str == "pressed") { valid=true; - ie.action.pressed; + return ie.action.pressed; } } diff --git a/drivers/unix/memory_pool_static_malloc.cpp b/drivers/unix/memory_pool_static_malloc.cpp index 62abe7d26d..e0bab27a63 100644 --- a/drivers/unix/memory_pool_static_malloc.cpp +++ b/drivers/unix/memory_pool_static_malloc.cpp @@ -153,7 +153,7 @@ void* MemoryPoolStaticMalloc::_realloc(void *p_memory,size_t p_bytes) { return alloc( p_bytes ); } - if (p_bytes<=0) { + if (p_bytes==0) { this->free(p_memory); ERR_FAIL_COND_V( p_bytes < 0 , NULL ); diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 4d3f8f110a..35ea7f15f8 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -641,11 +641,11 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest) { int iofs=ofs+8; - uint32_t string_count=decode_uint32(&p_manifest[iofs]); - uint32_t styles_count=decode_uint32(&p_manifest[iofs+4]); + string_count=decode_uint32(&p_manifest[iofs]); + styles_count=decode_uint32(&p_manifest[iofs+4]); uint32_t string_flags=decode_uint32(&p_manifest[iofs+8]); - uint32_t string_data_offset=decode_uint32(&p_manifest[iofs+12]); - uint32_t styles_offset=decode_uint32(&p_manifest[iofs+16]); + string_data_offset=decode_uint32(&p_manifest[iofs+12]); + styles_offset=decode_uint32(&p_manifest[iofs+16]); /* printf("string count: %i\n",string_count); printf("flags: %i\n",string_flags); diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index 66e29627cd..62b32729c3 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -168,7 +168,7 @@ Node* MeshInstance::create_trimesh_collision_node() { static_body->add_shape( shape ); return static_body; - return NULL; + } void MeshInstance::create_trimesh_collision() { @@ -202,7 +202,7 @@ Node* MeshInstance::create_convex_collision_node() { static_body->add_shape( shape ); return static_body; - return NULL; + } void MeshInstance::create_convex_collision() { diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index ffa1c09ab5..a7a4129a5f 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -269,7 +269,7 @@ Variant Tween::_run_equation(InterpolateData& p_data) { { case Variant::BOOL: - result = ((int) _run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, (int) initial_val, (int) delta_val, p_data.times_in_sec)) >= 0.5; + result = ( _run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, initial_val, delta_val, p_data.times_in_sec)) >= 0.5; break; case Variant::INT: diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 04a5591242..b1fd914fcd 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -51,20 +51,20 @@ void ScrollBar::_input_event(InputEvent p_event) { if (b.button_index==5 && b.pressed) { - if (orientation==VERTICAL) - set_val( get_val() + get_page() / 4.0 ); - else - set_val( get_val() + get_page() / 4.0 ); + //if (orientation==VERTICAL) + // set_val( get_val() + get_page() / 4.0 ); + //else + set_val( get_val() + get_page() / 4.0 ); accept_event(); } if (b.button_index==4 && b.pressed) { - if (orientation==HORIZONTAL) - set_val( get_val() - get_page() / 4.0 ); - else - set_val( get_val() - get_page() / 4.0 ); + //if (orientation==HORIZONTAL) + // set_val( get_val() - get_page() / 4.0 ); + //else + set_val( get_val() - get_page() / 4.0 ); accept_event(); } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index c54333856e..1e82432165 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1552,7 +1552,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { case KEY_HOME: case KEY_END: // ignore arrows if any modifiers are held (shift = selecting, others may be used for editor hotkeys) - if (k.mod.command || k.mod.shift || k.mod.alt || k.mod.command) + if (k.mod.command || k.mod.shift || k.mod.alt) break; unselect=true; break; diff --git a/scene/resources/scene_preloader.cpp b/scene/resources/scene_preloader.cpp index 08e88b32c0..09001c1a94 100644 --- a/scene/resources/scene_preloader.cpp +++ b/scene/resources/scene_preloader.cpp @@ -407,7 +407,7 @@ Dictionary ScenePreloader::_get_bundled_scene() const { rconns.push_back(cd.signal); rconns.push_back(cd.method); rconns.push_back(cd.binds.size()); - for(int j=0;j<cd.binds.size();i++) + for(int j=0;j<cd.binds.size();j++) rconns.push_back(cd.binds[j]); } diff --git a/servers/physics/joints/generic_6dof_joint_sw.cpp b/servers/physics/joints/generic_6dof_joint_sw.cpp index 3d569df2c9..decc379461 100644 --- a/servers/physics/joints/generic_6dof_joint_sw.cpp +++ b/servers/physics/joints/generic_6dof_joint_sw.cpp @@ -536,7 +536,7 @@ void Generic6DOFJointSW::set_param(Vector3::Axis p_axis,PhysicsServer::G6DOFJoin } break; case PhysicsServer::G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS: { - m_angularLimits[p_axis].m_limitSoftness; + m_angularLimits[p_axis].m_limitSoftness=p_value; } break; case PhysicsServer::G6DOF_JOINT_ANGULAR_DAMPING: { diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index 16a15617ff..088c092e75 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -285,7 +285,7 @@ Array Physics2DDirectSpaceState::_cast_motion(const Ref<Physics2DShapeQueryParam Array ret(true); ret.resize(2); ret[0]=closest_safe; - ret[0]=closest_unsafe; + ret[1]=closest_unsafe; return ret; } diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index a5c7d35490..010e02d884 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -303,7 +303,7 @@ Array PhysicsDirectSpaceState::_cast_motion(const Ref<PhysicsShapeQueryParameter Array ret(true); ret.resize(2); ret[0]=closest_safe; - ret[0]=closest_unsafe; + ret[1]=closest_unsafe; return ret; } diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 16676cec83..77b7ddbc93 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -1279,7 +1279,7 @@ ShaderLanguage::Node* ShaderLanguage::validate_function_call(Parser&parser, Oper if (p_func->op==OP_CONSTRUCT && all_const) { - bool all_const=false; + Vector<float> cdata; for(int i=0;i<argcount;i++) { diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp index 11ea9004d6..b7ec5c9d04 100644 --- a/tools/collada/collada.cpp +++ b/tools/collada/collada.cpp @@ -979,7 +979,7 @@ void Collada::_parse_curve_geometry(XMLParser& parser,String p_id,String p_name) current_source=id; COLLADA_PRINT("source data: "+id); - } else if (section=="float_array" || section=="array" || section=="float_array") { + } else if (section=="float_array" || section=="array") { // create a new array and read it. if (curvedata.sources.has(current_source)) { diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index c60c1d03d3..39eec4e69b 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -1375,7 +1375,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { if (p_input.is_action("ui_up")) selected_track--; if (v_scroll->is_visible() && p_input.is_action("ui_page_up")) - selected_track=selected_track--;; + selected_track--;; if (selected_track<0) selected_track=0; diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp index 49b8af67f4..d1fe10df03 100644 --- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp @@ -719,8 +719,8 @@ void EditorSampleImportPlugin::_compress_ima_adpcm(const Vector<float>& p_data,D xm_sample=CLAMP(in[i]*32767.0,-32768,32767); - if (xm_sample==32767 || xm_sample==-32768) - printf("clippy!\n",xm_sample); + //if (xm_sample==32767 || xm_sample==-32768) + // printf("clippy!\n",xm_sample); } // xm_sample=xm_sample+xm_prev; |