From d0ec46be682ef262c4d2518fd15237df0261f67b Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Thu, 30 Sep 2021 10:45:36 -0700 Subject: Remove shape metadata from 2D physics server Shape metadata was only used to get tile information when colliding with tilemaps. It's not needed anymore since there's an API in tilemap using body ids instead. --- servers/physics_2d/collision_object_2d_sw.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'servers/physics_2d/collision_object_2d_sw.h') diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h index 69487631a6..ca258a906a 100644 --- a/servers/physics_2d/collision_object_2d_sw.h +++ b/servers/physics_2d/collision_object_2d_sw.h @@ -58,7 +58,6 @@ private: BroadPhase2DSW::ID bpid = 0; Rect2 aabb_cache; //for rayqueries Shape2DSW *shape = nullptr; - Variant metadata; bool disabled = false; bool one_way_collision = false; real_t one_way_collision_margin = 0.0; @@ -110,7 +109,6 @@ public: void add_shape(Shape2DSW *p_shape, const Transform2D &p_transform = Transform2D(), bool p_disabled = false); void set_shape(int p_index, Shape2DSW *p_shape); void set_shape_transform(int p_index, const Transform2D &p_transform); - void set_shape_metadata(int p_index, const Variant &p_metadata); _FORCE_INLINE_ int get_shape_count() const { return shapes.size(); } _FORCE_INLINE_ Shape2DSW *get_shape(int p_index) const { @@ -129,10 +127,6 @@ public: CRASH_BAD_INDEX(p_index, shapes.size()); return shapes[p_index].aabb_cache; } - _FORCE_INLINE_ const Variant &get_shape_metadata(int p_index) const { - CRASH_BAD_INDEX(p_index, shapes.size()); - return shapes[p_index].metadata; - } _FORCE_INLINE_ const Transform2D &get_transform() const { return transform; } _FORCE_INLINE_ const Transform2D &get_inv_transform() const { return inv_transform; } -- cgit v1.2.3