void dealloc2(void* param)
{
free(param);
- param = 0; // FIXME: does this *do* anything???
}
enum {boneconnect, constraint, muscle};
{
static int i;
for (i = 0; i < num_joints; i++) {
- if (((joints[i].label != leftknee && joints[i].label != rightknee) || lowforward.y > -.1 || joints[i].mass < 5) && ((joints[i].label != rightelbow && joints[i].label != rightelbow) || forward.y < .3))
+ if (
+ (
+ ((joints[i].label != leftknee) && (joints[i].label != rightknee)) ||
+ (lowforward.y > -.1) ||
+ (joints[i].mass < 5)
+ ) && (
+ ((joints[i].label != leftelbow) && (joints[i].label != rightelbow)) ||
+ (forward.y < .3)
+ )
+ )
joints[i].velocity.y += gravity * multiplier / (*scale);
}
}
fseek ( tfile, lSize, SEEK_CUR);
}
- // ???
- lSize = sizeof(int);
for (j = 0; j < num_muscles; j++) {
for (i = 0; i < muscles[j].numverticeslow; i++) {
- if (muscles[j].numverticeslow && muscles[j].verticeslow[i] < modellow.vertexNum)
+ if (muscles[j].verticeslow[i] < modellow.vertexNum)
modellow.owner[muscles[j].verticeslow[i]] = j;
}
}
{
int i = 0;
- bool allocate = true;
-
- allocate = ((ani.numframes != numframes) || (ani.joints != joints));
+ bool allocate = ((ani.numframes != numframes) || (ani.joints != joints));
if (allocate)
deallocate();
attack = ani.attack;
joints = ani.joints;
weapontargetnum = ani.weapontargetnum;
+ offset = ani.offset;
if (allocate)
position = (XYZ**)malloc(sizeof(XYZ*)*ani.joints);