Increment index when populating PhysicsShapeQueryParameters exclude array.

This commit is contained in:
Marcel Admiraal 2020-09-27 10:33:35 +01:00
parent 4162df4397
commit e7d779dbb3
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ Vector<RID> Physics2DShapeQueryParameters::get_exclude() const {
ret.resize(exclude.size());
int idx = 0;
for (Set<RID>::Element *E = exclude.front(); E; E = E->next()) {
ret.write[idx] = E->get();
ret.write[idx++] = E->get();
}
return ret;
}

View File

@ -195,7 +195,7 @@ Vector<RID> PhysicsShapeQueryParameters::get_exclude() const {
ret.resize(exclude.size());
int idx = 0;
for (Set<RID>::Element *E = exclude.front(); E; E = E->next()) {
ret.write[idx] = E->get();
ret.write[idx++] = E->get();
}
return ret;
}