summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorMarc Gilleron <marc.gilleron@gmail.com>2022-09-19 15:45:45 +0100
committerMarc Gilleron <marc.gilleron@gmail.com>2022-09-21 21:18:54 +0100
commit474cee7dafa4df94294de3e1c45e049defd7cfc5 (patch)
tree45817134039d7d24b4a596b578e5b024f9624540 /scene/2d
parent908795301b9e4fcf24b115329a48d7d295c13a1a (diff)
Rename and expose `RefCounted::get_reference_count()`
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/physics_body_2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 2aa14aa11a..cc126dd511 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -62,7 +62,7 @@ Ref<KinematicCollision2D> PhysicsBody2D::_move(const Vector2 &p_distance, bool p
if (move_and_collide(parameters, result, p_test_only)) {
// Create a new instance when the cached reference is invalid or still in use in script.
- if (motion_cache.is_null() || motion_cache->reference_get_count() > 1) {
+ if (motion_cache.is_null() || motion_cache->get_reference_count() > 1) {
motion_cache.instantiate();
motion_cache->owner = this;
}
@@ -1557,7 +1557,7 @@ Ref<KinematicCollision2D> CharacterBody2D::_get_slide_collision(int p_bounce) {
}
// Create a new instance when the cached reference is invalid or still in use in script.
- if (slide_colliders[p_bounce].is_null() || slide_colliders[p_bounce]->reference_get_count() > 1) {
+ if (slide_colliders[p_bounce].is_null() || slide_colliders[p_bounce]->get_reference_count() > 1) {
slide_colliders.write[p_bounce].instantiate();
slide_colliders.write[p_bounce]->owner = this;
}