summaryrefslogtreecommitdiff
path: root/servers/physics_2d/godot_physics_server_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d/godot_physics_server_2d.cpp')
-rw-r--r--servers/physics_2d/godot_physics_server_2d.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/physics_2d/godot_physics_server_2d.cpp b/servers/physics_2d/godot_physics_server_2d.cpp
index 650a95c914..f82f2533f3 100644
--- a/servers/physics_2d/godot_physics_server_2d.cpp
+++ b/servers/physics_2d/godot_physics_server_2d.cpp
@@ -1179,7 +1179,7 @@ void GodotPhysicsServer2D::free(RID p_rid) {
GodotShape2D *shape = shape_owner.get_or_null(p_rid);
while (shape->get_owners().size()) {
- GodotShapeOwner2D *so = shape->get_owners().front()->key();
+ GodotShapeOwner2D *so = shape->get_owners().begin()->key;
so->remove_shape(shape);
}
@@ -1250,7 +1250,7 @@ void GodotPhysicsServer2D::step(real_t p_step) {
island_count = 0;
active_objects = 0;
collision_pairs = 0;
- for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) {
+ for (RBSet<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) {
stepper->step(const_cast<GodotSpace2D *>(E->get()), p_step);
island_count += E->get()->get_island_count();
active_objects += E->get()->get_active_objects();
@@ -1271,7 +1271,7 @@ void GodotPhysicsServer2D::flush_queries() {
uint64_t time_beg = OS::get_singleton()->get_ticks_usec();
- for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) {
+ for (RBSet<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) {
GodotSpace2D *space = const_cast<GodotSpace2D *>(E->get());
space->call_queries();
}
@@ -1292,7 +1292,7 @@ void GodotPhysicsServer2D::flush_queries() {
total_time[i] = 0;
}
- for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) {
+ for (RBSet<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) {
for (int i = 0; i < GodotSpace2D::ELAPSED_TIME_MAX; i++) {
total_time[i] += E->get()->get_elapsed_time(GodotSpace2D::ElapsedTime(i));
}