diff options
author | Rafał Mikrut <mikrutrafal@protonmail.com> | 2021-02-07 22:29:31 +0100 |
---|---|---|
committer | Rafał Mikrut <mikrutrafal@protonmail.com> | 2021-02-07 22:29:31 +0100 |
commit | 003bb8e1a8c9bb81e3cb0733b3f0d569b1518881 (patch) | |
tree | 3c7f54d3b3e6d355a2ffb14933e0b5461478b224 /scene/2d/collision_shape_2d.h | |
parent | 57e2822a05c29db3980ad243c37a34acf6c4d14b (diff) | |
download | redot-engine-003bb8e1a8c9bb81e3cb0733b3f0d569b1518881.tar.gz |
Initialize class variables with default values in scene/ [1/2]
Diffstat (limited to 'scene/2d/collision_shape_2d.h')
-rw-r--r-- | scene/2d/collision_shape_2d.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h index 17cc4187c9..695d0c6657 100644 --- a/scene/2d/collision_shape_2d.h +++ b/scene/2d/collision_shape_2d.h @@ -39,13 +39,13 @@ class CollisionObject2D; class CollisionShape2D : public Node2D { GDCLASS(CollisionShape2D, Node2D); Ref<Shape2D> shape; - Rect2 rect; - uint32_t owner_id; - CollisionObject2D *parent; + Rect2 rect = Rect2(-Point2(10, 10), Point2(20, 20)); + uint32_t owner_id = 0; + CollisionObject2D *parent = nullptr; void _shape_changed(); - bool disabled; - bool one_way_collision; - real_t one_way_collision_margin; + bool disabled = false; + bool one_way_collision = false; + real_t one_way_collision_margin = 1.0; void _update_in_shape_owner(bool p_xform_only = false); |