diff options
author | qarmin <mikrutrafal@protonmail.com> | 2021-09-14 11:01:49 +0200 |
---|---|---|
committer | RafaĆ Mikrut <mikrutrafal@protonmail.com> | 2021-09-15 19:41:32 +0200 |
commit | 91257c39000517dd5644caf0e02a7bc6cd4574a9 (patch) | |
tree | bda41f7f6f95f48a9e8a4f1df794e48c767eded3 /servers/physics_2d/physics_server_2d_sw.h | |
parent | 7b21b1bb608909b373237d19467c6236537b8062 (diff) |
Initialize variables in servers/physics
Diffstat (limited to 'servers/physics_2d/physics_server_2d_sw.h')
-rw-r--r-- | servers/physics_2d/physics_server_2d_sw.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/servers/physics_2d/physics_server_2d_sw.h b/servers/physics_2d/physics_server_2d_sw.h index 6a2d9e37e0..3c5e753452 100644 --- a/servers/physics_2d/physics_server_2d_sw.h +++ b/servers/physics_2d/physics_server_2d_sw.h @@ -43,19 +43,19 @@ class PhysicsServer2DSW : public PhysicsServer2D { friend class PhysicsDirectSpaceState2DSW; friend class PhysicsDirectBodyState2DSW; - bool active; - int iterations; - bool doing_sync; + bool active = true; + int iterations = 0; + bool doing_sync = false; - int island_count; - int active_objects; - int collision_pairs; + int island_count = 0; + int active_objects = 0; + int collision_pairs = 0; - bool using_threads; + bool using_threads = false; - bool flushing_queries; + bool flushing_queries = false; - Step2DSW *stepper; + Step2DSW *stepper = nullptr; Set<const Space2DSW *> active_spaces; mutable RID_PtrOwner<Shape2DSW, true> shape_owner; @@ -76,12 +76,12 @@ class PhysicsServer2DSW : public PhysicsServer2D { public: struct CollCbkData { Vector2 valid_dir; - real_t valid_depth; - int max; - int amount; - int passed; - int invalid_by_dir; - Vector2 *ptr; + real_t valid_depth = 0.0; + int max = 0; + int amount = 0; + int passed = 0; + int invalid_by_dir = 0; + Vector2 *ptr = nullptr; }; virtual RID world_margin_shape_create() override; |