mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #1642 from vitawrap/patch-1
ConvexFeature: Fix collision list object references
This commit is contained in:
commit
a10a5dedf9
|
|
@ -111,13 +111,14 @@ bool ConvexFeature::collide(ConvexFeature& cf,CollisionList* cList, F32 tol)
|
||||||
U32 storeCount = cList->getCount();
|
U32 storeCount = cList->getCount();
|
||||||
testVertex(*vert,cList,true, tol);
|
testVertex(*vert,cList,true, tol);
|
||||||
|
|
||||||
// Fix up last reference. material and object are copied from this rather
|
// Fix up added references. material and object are copied from this rather
|
||||||
// than the object we're colliding against.
|
// than the object we're colliding against.
|
||||||
if (storeCount != cList->getCount())
|
while (storeCount < cList->getCount())
|
||||||
{
|
{
|
||||||
Collision &col = (*cList)[cList->getCount() - 1];
|
Collision &col = (*cList)[storeCount];
|
||||||
col.material = cf.material;
|
col.material = cf.material;
|
||||||
col.object = cf.mObject;
|
col.object = cf.mObject;
|
||||||
|
++storeCount;
|
||||||
}
|
}
|
||||||
vert++;
|
vert++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue