mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Change RID_Owner::get_owned_list.
This commit is contained in:
parent
2d3bdcac35
commit
1a70a06a43
11 changed files with 74 additions and 102 deletions
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "core/os/mutex.h"
|
||||
#include "scene/main/node.h"
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef CLIPPER2_ENABLED
|
||||
#include "nav_mesh_generator_2d.h"
|
||||
|
|
@ -193,11 +194,12 @@ void GodotNavigationServer2D::add_command(SetCommand2D *p_command) {
|
|||
|
||||
TypedArray<RID> GodotNavigationServer2D::get_maps() const {
|
||||
TypedArray<RID> all_map_rids;
|
||||
List<RID> maps_owned;
|
||||
map_owner.get_owned_list(&maps_owned);
|
||||
if (maps_owned.size()) {
|
||||
for (const RID &E : maps_owned) {
|
||||
all_map_rids.push_back(E);
|
||||
LocalVector<RID> maps_owned = map_owner.get_owned_list();
|
||||
uint32_t map_count = maps_owned.size();
|
||||
if (map_count) {
|
||||
all_map_rids.resize(map_count);
|
||||
for (uint32_t i = 0; i < map_count; i++) {
|
||||
all_map_rids[i] = maps_owned[i];
|
||||
}
|
||||
}
|
||||
return all_map_rids;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue