Skip to content

Commit

Permalink
space_step() stubs for dummy physics servers
Browse files Browse the repository at this point in the history
  • Loading branch information
jss2a98aj committed Jan 13, 2025
1 parent eb354b7 commit 1710280
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions servers/physics_server_2d_dummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ class PhysicsServer2DDummy : public PhysicsServer2D {
virtual RID space_create() override { return RID(); }
virtual void space_set_active(RID p_space, bool p_active) override {}
virtual bool space_is_active(RID p_space) const override { return false; }
virtual void space_step(RID p_space, real_t p_delta) override {}
virtual void space_flush_queries(RID p_space) override {}

virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) override {}
virtual real_t space_get_param(RID p_space, SpaceParameter p_param) const override { return 0; }
Expand Down Expand Up @@ -345,6 +347,7 @@ class PhysicsServer2DDummy : public PhysicsServer2D {
virtual bool is_flushing_queries() const override { return false; }

virtual int get_process_info(ProcessInfo p_info) override { return 0; }
virtual int space_get_last_process_info(RID p_space, ProcessInfo p_info) override { return 0; }
};

#endif // PHYSICS_SERVER_2D_DUMMY_H
3 changes: 3 additions & 0 deletions servers/physics_server_3d_dummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ class PhysicsServer3DDummy : public PhysicsServer3D {
virtual RID space_create() override { return RID(); }
virtual void space_set_active(RID p_space, bool p_active) override {}
virtual bool space_is_active(RID p_space) const override { return false; }
virtual void space_step(RID p_space, real_t p_delta) override {}
virtual void space_flush_queries(RID p_space) override {}

virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) override {}
virtual real_t space_get_param(RID p_space, SpaceParameter p_param) const override { return 0; }
Expand Down Expand Up @@ -431,6 +433,7 @@ class PhysicsServer3DDummy : public PhysicsServer3D {
virtual bool is_flushing_queries() const override { return false; }

virtual int get_process_info(ProcessInfo p_info) override { return 0; }
virtual int space_get_last_process_info(RID p_space, ProcessInfo p_info) override { return 0; }
};

#endif // PHYSICS_SERVER_3D_DUMMY_H

0 comments on commit 1710280

Please sign in to comment.