]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
unused IQM scaling
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 15 Apr 2010 21:46:01 +0000 (21:46 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 15 Apr 2010 21:46:01 +0000 (21:46 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10090 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c
model_iqm.h

index f0e9a7c33f90b68f77cc61375250e842da86992d..be57386d119730115cc68ce0e951c9816c040c3a 100644 (file)
@@ -3097,8 +3097,8 @@ void Mod_INTERQUAKEMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
        header = (iqmheader_t *)buffer;
        if (memcmp(header->id, "INTERQUAKEMODEL", 16))
                Host_Error ("Mod_INTERQUAKEMODEL_Load: %s is not an Inter-Quake Model", loadmodel->name);
-       if (LittleLong(header->version) != 0)
-               Host_Error ("Mod_INTERQUAKEMODEL_Load: only version 0 models are currently supported (name = %s)", loadmodel->name);
+       if (LittleLong(header->version) != 1)
+               Host_Error ("Mod_INTERQUAKEMODEL_Load: only version 1 models are currently supported (name = %s)", loadmodel->name);
 
        loadmodel->modeldatatypestring = "IQM";
 
@@ -3263,6 +3263,7 @@ void Mod_INTERQUAKEMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
                {
                        joint[i].origin[j] = LittleFloat(joint[i].origin[j]);
                        joint[i].rotation[j] = LittleFloat(joint[i].rotation[j]);
+                       joint[i].scale[j] = LittleFloat(joint[i].scale[j]);
                }
                strlcpy(loadmodel->data_bones[i].name, &text[joint[i].name], sizeof(loadmodel->data_bones[i].name));
                loadmodel->data_bones[i].parent = joint[i].parent;
@@ -3302,12 +3303,18 @@ void Mod_INTERQUAKEMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
                pose[i].channeloffset[3] = LittleFloat(pose[i].channeloffset[3]);
                pose[i].channeloffset[4] = LittleFloat(pose[i].channeloffset[4]);
                pose[i].channeloffset[5] = LittleFloat(pose[i].channeloffset[5]);
+               pose[i].channeloffset[6] = LittleFloat(pose[i].channeloffset[6]);
+               pose[i].channeloffset[7] = LittleFloat(pose[i].channeloffset[7]);
+               pose[i].channeloffset[8] = LittleFloat(pose[i].channeloffset[8]);
                pose[i].channelscale[0] = LittleFloat(pose[i].channelscale[0]);
                pose[i].channelscale[1] = LittleFloat(pose[i].channelscale[1]);
                pose[i].channelscale[2] = LittleFloat(pose[i].channelscale[2]);
                pose[i].channelscale[3] = LittleFloat(pose[i].channelscale[3]);
                pose[i].channelscale[4] = LittleFloat(pose[i].channelscale[4]);
                pose[i].channelscale[5] = LittleFloat(pose[i].channelscale[5]);
+               pose[i].channelscale[6] = LittleFloat(pose[i].channelscale[6]);
+               pose[i].channelscale[7] = LittleFloat(pose[i].channelscale[7]);
+               pose[i].channelscale[8] = LittleFloat(pose[i].channelscale[8]);
                f = fabs(pose[i].channeloffset[0]); biggestorigin = max(biggestorigin, f);
                f = fabs(pose[i].channeloffset[1]); biggestorigin = max(biggestorigin, f);
                f = fabs(pose[i].channeloffset[2]); biggestorigin = max(biggestorigin, f);
index c9222a55b60cfa3fa754a11152f9cbb03a0bc4df..a56829b4a1ddfc24f80a9aa9962fef3f25e87f8c 100644 (file)
@@ -61,7 +61,7 @@ typedef struct iqmjoint_s
 {
        unsigned int name;
        signed int parent;
-       float origin[3], rotation[3];
+       float origin[3], rotation[3], scale[3];
 }
 iqmjoint_t;
 
@@ -69,7 +69,7 @@ typedef struct iqmpose_s
 {
        signed int parent;
        unsigned int channelmask;
-       float channeloffset[6], channelscale[6];
+       float channeloffset[9], channelscale[9];
 }
 iqmpose_t;