Merge pull request #11535 from damarindra/master
Fix: CollisionObject shape owner indexing is inconsistent
This commit is contained in:
commit
071088cb14
2 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ uint32_t CollisionObject2D::create_shape_owner(Object *p_owner) {
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
|
|
||||||
if (shapes.size() == 0) {
|
if (shapes.size() == 0) {
|
||||||
id = 1;
|
id = 0;
|
||||||
} else {
|
} else {
|
||||||
id = shapes.back()->key() + 1;
|
id = shapes.back()->key() + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ uint32_t CollisionObject::create_shape_owner(Object *p_owner) {
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
|
|
||||||
if (shapes.size() == 0) {
|
if (shapes.size() == 0) {
|
||||||
id = 1;
|
id = 0;
|
||||||
} else {
|
} else {
|
||||||
id = shapes.back()->key() + 1;
|
id = shapes.back()->key() + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue