diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/audio/effects/audio_effect_pitch_shift.cpp | 2 | ||||
-rw-r--r-- | servers/physics/collision_solver_sat.cpp | 4 | ||||
-rw-r--r-- | servers/physics/collision_solver_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics/joints/hinge_joint_sw.cpp | 1 | ||||
-rw-r--r-- | servers/physics_2d/body_2d_sw.cpp | 24 | ||||
-rw-r--r-- | servers/physics_2d/broad_phase_2d_hash_grid.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/collision_solver_2d_sat.cpp | 4 | ||||
-rw-r--r-- | servers/physics_2d/collision_solver_2d_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_wrap_mt.cpp | 2 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 4 | ||||
-rw-r--r-- | servers/visual_server.cpp | 4 |
11 files changed, 22 insertions, 31 deletions
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp index c250f2e2bd..ec3182685f 100644 --- a/servers/audio/effects/audio_effect_pitch_shift.cpp +++ b/servers/audio/effects/audio_effect_pitch_shift.cpp @@ -70,7 +70,7 @@ * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice and this license appear in all source copies. * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF -* ANY KIND. See http://www.dspguru.com/wol.htm for more information. +* ANY KIND. See https://dspguru.com/wide-open-license/ for more information. * *****************************************************************************/ diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp index a13fa65009..d0f8fd8aff 100644 --- a/servers/physics/collision_solver_sat.cpp +++ b/servers/physics/collision_solver_sat.cpp @@ -274,8 +274,8 @@ static void _generate_contacts_from_supports(const Vector3 *p_points_A, int p_po points_B = p_points_B; } - int version_A = (pointcount_A > 3 ? 3 : pointcount_A) - 1; - int version_B = (pointcount_B > 3 ? 3 : pointcount_B) - 1; + int version_A = (pointcount_A > 2 ? 2 : pointcount_A) - 1; + int version_B = (pointcount_B > 2 ? 2 : pointcount_B) - 1; GenerateContactsFunc contacts_func = generate_contacts_func_table[version_A][version_B]; ERR_FAIL_COND(!contacts_func); diff --git a/servers/physics/collision_solver_sw.cpp b/servers/physics/collision_solver_sw.cpp index 0d10dae8cc..d970dd39fb 100644 --- a/servers/physics/collision_solver_sw.cpp +++ b/servers/physics/collision_solver_sw.cpp @@ -233,8 +233,6 @@ bool CollisionSolverSW::solve_static(const ShapeSW *p_shape_A, const Transform & return collision_solver(p_shape_A, p_transform_A, p_shape_B, p_transform_B, p_result_callback, p_userdata, false, r_sep_axis, p_margin_A, p_margin_B); } - - return false; } void CollisionSolverSW::concave_distance_callback(void *p_userdata, ShapeSW *p_convex) { @@ -371,6 +369,4 @@ bool CollisionSolverSW::solve_distance(const ShapeSW *p_shape_A, const Transform return gjk_epa_calculate_distance(p_shape_A, p_transform_A, p_shape_B, p_transform_B, r_point_A, r_point_B); //should pass sepaxis.. } - - return false; } diff --git a/servers/physics/joints/hinge_joint_sw.cpp b/servers/physics/joints/hinge_joint_sw.cpp index 1d1b30286e..209cddda5e 100644 --- a/servers/physics/joints/hinge_joint_sw.cpp +++ b/servers/physics/joints/hinge_joint_sw.cpp @@ -198,7 +198,6 @@ bool HingeJointSW::setup(real_t p_step) { plane_space(m_rbAFrame.basis.get_axis(2), jointAxis0local, jointAxis1local); - A->get_transform().basis.xform(m_rbAFrame.basis.get_axis(2)); Vector3 jointAxis0 = A->get_transform().basis.xform(jointAxis0local); Vector3 jointAxis1 = A->get_transform().basis.xform(jointAxis1local); Vector3 hingeAxisWorld = A->get_transform().basis.xform(m_rbAFrame.basis.get_axis(2)); diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index 60bbcef4b6..5dff655ea1 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -185,28 +185,28 @@ real_t Body2DSW::get_param(Physics2DServer::BodyParameter p_param) const { case Physics2DServer::BODY_PARAM_BOUNCE: { return bounce; - } break; + } case Physics2DServer::BODY_PARAM_FRICTION: { return friction; - } break; + } case Physics2DServer::BODY_PARAM_MASS: { return mass; - } break; + } case Physics2DServer::BODY_PARAM_INERTIA: { return _inv_inertia == 0 ? 0 : 1.0 / _inv_inertia; - } break; + } case Physics2DServer::BODY_PARAM_GRAVITY_SCALE: { return gravity_scale; - } break; + } case Physics2DServer::BODY_PARAM_LINEAR_DAMP: { return linear_damp; - } break; + } case Physics2DServer::BODY_PARAM_ANGULAR_DAMP: { return angular_damp; - } break; + } default: { } } @@ -343,19 +343,19 @@ Variant Body2DSW::get_state(Physics2DServer::BodyState p_state) const { switch (p_state) { case Physics2DServer::BODY_STATE_TRANSFORM: { return get_transform(); - } break; + } case Physics2DServer::BODY_STATE_LINEAR_VELOCITY: { return linear_velocity; - } break; + } case Physics2DServer::BODY_STATE_ANGULAR_VELOCITY: { return angular_velocity; - } break; + } case Physics2DServer::BODY_STATE_SLEEPING: { return !is_active(); - } break; + } case Physics2DServer::BODY_STATE_CAN_SLEEP: { return can_sleep; - } break; + } } return Variant(); diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp index 1bbb50c974..6dd19c2868 100644 --- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp +++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp @@ -673,7 +673,7 @@ public IEnumerable<Point3D> GetCellsOnRay(Ray ray, int maxDepth) // "A Fast Voxel Traversal Algorithm for Ray Tracing" // John Amanatides, Andrew Woo // http://www.cse.yorku.ca/~amana/research/grid.pdf - // http://www.devmaster.net/articles/raytracing_series/A%20faster%20voxel%20traversal%20algorithm%20for%20ray%20tracing.pdf + // https://web.archive.org/web/20100616193049/http://www.devmaster.net/articles/raytracing_series/A%20faster%20voxel%20traversal%20algorithm%20for%20ray%20tracing.pdf // NOTES: // * This code assumes that the ray's position and direction are in 'cell coordinates', which means diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp index 9d75f71ff0..19e4b8c1d9 100644 --- a/servers/physics_2d/collision_solver_2d_sat.cpp +++ b/servers/physics_2d/collision_solver_2d_sat.cpp @@ -172,8 +172,8 @@ static void _generate_contacts_from_supports(const Vector2 *p_points_A, int p_po points_B = p_points_B; } - int version_A = (pointcount_A > 3 ? 3 : pointcount_A) - 1; - int version_B = (pointcount_B > 3 ? 3 : pointcount_B) - 1; + int version_A = (pointcount_A > 2 ? 2 : pointcount_A) - 1; + int version_B = (pointcount_B > 2 ? 2 : pointcount_B) - 1; GenerateContactsFunc contacts_func = generate_contacts_func_table[version_A][version_B]; ERR_FAIL_COND(!contacts_func); diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp index e49961c048..03c0fd5981 100644 --- a/servers/physics_2d/collision_solver_2d_sw.cpp +++ b/servers/physics_2d/collision_solver_2d_sw.cpp @@ -249,6 +249,4 @@ bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A, const Transform2D &p return collision_solver(p_shape_A, p_transform_A, p_motion_A, p_shape_B, p_transform_B, p_motion_B, p_result_callback, p_userdata, false, sep_axis, margin_A, margin_B); } - - return false; } diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp index 71c00c0abf..c698290fd9 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp +++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp @@ -54,8 +54,6 @@ void Physics2DServerWrapMT::thread_loop() { server_thread = Thread::get_caller_id(); - OS::get_singleton()->make_rendering_thread(); - physics_2d_server->init(); exit = false; diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 14fefbf195..25973aa295 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -967,7 +967,7 @@ bool ShaderLanguage::_find_identifier(const BlockNode *p_block, const Map<String bool ShaderLanguage::_validate_operator(OperatorNode *p_op, DataType *r_ret_type) { bool valid = false; - DataType ret_type; + DataType ret_type = TYPE_VOID; switch (p_op->op) { case OP_EQUAL: @@ -3059,7 +3059,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons String ident = identifier; bool ok = true; - DataType member_type; + DataType member_type = TYPE_VOID; switch (dt) { case TYPE_BVEC2: case TYPE_IVEC2: diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index c6468694fd..25e18d0623 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1118,7 +1118,7 @@ void VisualServer::mesh_add_surface_from_arrays(RID p_mesh, PrimitiveType p_prim } offsets[i] = elem_size; continue; - } break; + } default: { ERR_FAIL(); } @@ -1286,7 +1286,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } offsets[i] = elem_size; continue; - } break; + } default: { ERR_FAIL_V(Array()); } |