mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Remove usage of unitialized variables
This commit is contained in:
@@ -170,7 +170,7 @@ bool GodotBodyPair2D::_test_ccd(real_t p_step, GodotBody2D *p_A, int p_shape_A,
|
||||
|
||||
Vector2 mnormal = motion / mlen;
|
||||
|
||||
real_t min, max;
|
||||
real_t min = 0.0, max = 0.0;
|
||||
p_A->get_shape(p_shape_A)->project_rangev(mnormal, p_xform_A, min, max);
|
||||
|
||||
// Did it move enough in this direction to even attempt raycast?
|
||||
|
||||
@@ -197,7 +197,7 @@ bool GodotCollisionSolver2D::solve_concave(const GodotShape2D *p_shape_A, const
|
||||
real_t axis_scale = 1.0 / axis.length();
|
||||
axis *= axis_scale;
|
||||
|
||||
real_t smin, smax;
|
||||
real_t smin = 0.0, smax = 0.0;
|
||||
p_shape_A->project_rangev(axis, rel_transform, smin, smax);
|
||||
smin *= axis_scale;
|
||||
smax *= axis_scale;
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
axis = Vector2(0.0, 1.0);
|
||||
}
|
||||
|
||||
real_t min_A, max_A, min_B, max_B;
|
||||
real_t min_A = 0.0, max_A = 0.0, min_B = 0.0, max_B = 0.0;
|
||||
|
||||
if (castA) {
|
||||
shape_A->project_range_cast(motion_A, axis, *transform_A, min_A, max_A);
|
||||
|
||||
Reference in New Issue
Block a user