mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #56 from lioncash/tentacle
MP1/CFlaahgraTentacle: Amend sphere collision list appending
This commit is contained in:
commit
eae1f1ab82
|
@ -84,15 +84,17 @@ void CFlaahgraTentacle::Think(float dt, CStateManager& mgr) {
|
||||||
|
|
||||||
void CFlaahgraTentacle::AddSphereCollisionList(const SSphereJointInfo* sphereJoints, s32 jointCount,
|
void CFlaahgraTentacle::AddSphereCollisionList(const SSphereJointInfo* sphereJoints, s32 jointCount,
|
||||||
std::vector<CJointCollisionDescription>& outJoints) {
|
std::vector<CJointCollisionDescription>& outJoints) {
|
||||||
|
|
||||||
const CAnimData* animData = GetModelData()->GetAnimationData();
|
const CAnimData* animData = GetModelData()->GetAnimationData();
|
||||||
|
|
||||||
for (u32 i = 0; i < jointCount; ++i) {
|
for (s32 i = 0; i < jointCount; ++i) {
|
||||||
CSegId segId = animData->GetLocatorSegId(sphereJoints[i].name);
|
const SSphereJointInfo& sphereJoint = sphereJoints[i];
|
||||||
if (segId == 0xFF)
|
const CSegId segId = animData->GetLocatorSegId(sphereJoint.name);
|
||||||
|
|
||||||
|
if (segId == 0xFF) {
|
||||||
continue;
|
continue;
|
||||||
outJoints.push_back(
|
}
|
||||||
CJointCollisionDescription::SphereCollision(segId, sphereJoints->radius, sphereJoints->name, 10.f));
|
|
||||||
|
outJoints.push_back(CJointCollisionDescription::SphereCollision(segId, sphereJoint.radius, sphereJoint.name, 10.f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue