summaryrefslogtreecommitdiff
path: root/scene/resources/polygon_path_finder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/polygon_path_finder.cpp')
-rw-r--r--scene/resources/polygon_path_finder.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp
index 3dc3e6005a..2156487407 100644
--- a/scene/resources/polygon_path_finder.cpp
+++ b/scene/resources/polygon_path_finder.cpp
@@ -448,7 +448,7 @@ void PolygonPathFinder::_set_data(const Dictionary& p_data) {
ERR_FAIL_COND(!p_data.has("segments"));
ERR_FAIL_COND(!p_data.has("bounds"));
- DVector<Vector2> p=p_data["points"];
+ PoolVector<Vector2> p=p_data["points"];
Array c=p_data["connections"];
ERR_FAIL_COND(c.size()!=p.size());
@@ -458,11 +458,11 @@ void PolygonPathFinder::_set_data(const Dictionary& p_data) {
int pc = p.size();
points.resize(pc+2);
- DVector<Vector2>::Read pr=p.read();
+ PoolVector<Vector2>::Read pr=p.read();
for(int i=0;i<pc;i++) {
points[i].pos=pr[i];
- DVector<int> con=c[i];
- DVector<int>::Read cr=con.read();
+ PoolVector<int> con=c[i];
+ PoolVector<int>::Read cr=con.read();
int cc=con.size();
for(int j=0;j<cc;j++) {
@@ -473,19 +473,19 @@ void PolygonPathFinder::_set_data(const Dictionary& p_data) {
if (p_data.has("penalties")) {
- DVector<float> penalties=p_data["penalties"];
+ PoolVector<float> penalties=p_data["penalties"];
if (penalties.size()==pc) {
- DVector<float>::Read pr = penalties.read();
+ PoolVector<float>::Read pr = penalties.read();
for(int i=0;i<pc;i++) {
points[i].penalty=pr[i];
}
}
}
- DVector<int> segs=p_data["segments"];
+ PoolVector<int> segs=p_data["segments"];
int sc=segs.size();
ERR_FAIL_COND(sc&1);
- DVector<int>::Read sr = segs.read();
+ PoolVector<int>::Read sr = segs.read();
for(int i=0;i<sc;i+=2) {
Edge e(sr[i],sr[i+1]);
@@ -498,25 +498,25 @@ void PolygonPathFinder::_set_data(const Dictionary& p_data) {
Dictionary PolygonPathFinder::_get_data() const{
Dictionary d;
- DVector<Vector2> p;
- DVector<int> ind;
+ PoolVector<Vector2> p;
+ PoolVector<int> ind;
Array connections;
p.resize(points.size()-2);
connections.resize(points.size()-2);
ind.resize(edges.size()*2);
- DVector<float> penalties;
+ PoolVector<float> penalties;
penalties.resize(points.size()-2);
{
- DVector<Vector2>::Write wp=p.write();
- DVector<float>::Write pw=penalties.write();
+ PoolVector<Vector2>::Write wp=p.write();
+ PoolVector<float>::Write pw=penalties.write();
for(int i=0;i<points.size()-2;i++) {
wp[i]=points[i].pos;
pw[i]=points[i].penalty;
- DVector<int> c;
+ PoolVector<int> c;
c.resize(points[i].connections.size());
{
- DVector<int>::Write cw=c.write();
+ PoolVector<int>::Write cw=c.write();
int idx=0;
for (Set<int>::Element *E=points[i].connections.front();E;E=E->next()) {
cw[idx++]=E->get();
@@ -527,7 +527,7 @@ Dictionary PolygonPathFinder::_get_data() const{
}
{
- DVector<int>::Write iw=ind.write();
+ PoolVector<int>::Write iw=ind.write();
int idx=0;
for (Set<Edge>::Element *E=edges.front();E;E=E->next()) {
iw[idx++]=E->get().points[0];