]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_alias.c
reorganized a lot of renderer variables into r_refdef, and split some things out...
[xonotic/darkplaces.git] / model_alias.c
index 52b33909c79c60a4ed527d485074bd91234e2c92..d9827db113033785c424d57e9cb14f38d09b61d1 100644 (file)
@@ -1465,7 +1465,7 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        // reconstruct frame 0 matrices to allow reconstruction of the base mesh
        // (converting from weight-blending skeletal animation to
        //  deformation-based skeletal animation)
-       bonepose = Z_Malloc(loadmodel->num_bones * sizeof(float[12]));
+       bonepose = (float *)Z_Malloc(loadmodel->num_bones * sizeof(float[12]));
        for (i = 0;i < loadmodel->num_bones;i++)
        {
                const float *m = loadmodel->data_poses + i * 12;
@@ -1739,7 +1739,7 @@ void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        // reconstruct frame 0 matrices to allow reconstruction of the base mesh
        // (converting from weight-blending skeletal animation to
        //  deformation-based skeletal animation)
-       bonepose = Z_Malloc(loadmodel->num_bones * sizeof(float[12]));
+       bonepose = (float *)Z_Malloc(loadmodel->num_bones * sizeof(float[12]));
        for (i = 0;i < loadmodel->num_bones;i++)
        {
                const float *m = loadmodel->data_poses + i * 12;
@@ -2224,13 +2224,9 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
                                }
                                else
                                {
-                                       //p->quat[0] *=  1;
-                                       //p->quat[1] *= -1;
-                                       //p->quat[2] *=  1;
-                                       // clear root bone to defaults to recenter all frames of an animation
-                                       // (root bone is often tilted, or worse);
-                                       VectorSet(p->origin, 0, 0, 0);
-                                       Vector4Set(p->quat, 0, 0, 0.707106781187, 0.707106781187);
+                                       p->quat[0] *=  1;
+                                       p->quat[1] *= -1;
+                                       p->quat[2] *=  1;
                                }
 #endif
                        }