]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_alias.c
added two more psk/psa versions reported by Kazashi
[xonotic/darkplaces.git] / model_alias.c
index d36e737ad6f4d23d7467fc9f310aff0379820e62..4b43e42f340462834d92d5dd02045053b28ee268 100644 (file)
@@ -234,7 +234,7 @@ static void Mod_MDLMD2MD3_TraceBox(model_t *model, int frame, trace_t *trace, co
                                vertex3f = Z_Malloc(maxvertices * sizeof(float[3]));
                        }
                        Mod_Alias_GetMesh_Vertex3f(model, frameblend, mesh, vertex3f);
-                       Collision_TraceLineTriangleMeshFloat(trace, start, end, mesh->num_triangles, mesh->data_element3i, vertex3f, SUPERCONTENTS_SOLID, segmentmins, segmentmaxs);
+                       Collision_TraceLineTriangleMeshFloat(trace, start, end, mesh->num_triangles, mesh->data_element3i, vertex3f, SUPERCONTENTS_SOLID, 0, surface->texture, segmentmins, segmentmaxs);
                }
        }
        else
@@ -252,8 +252,8 @@ static void Mod_MDLMD2MD3_TraceBox(model_t *model, int frame, trace_t *trace, co
                VectorAdd(start, boxmaxs, boxstartmaxs);
                VectorAdd(end, boxmins, boxendmins);
                VectorAdd(end, boxmaxs, boxendmaxs);
-               thisbrush_start = Collision_BrushForBox(&identitymatrix, boxstartmins, boxstartmaxs);
-               thisbrush_end = Collision_BrushForBox(&identitymatrix, boxendmins, boxendmaxs);
+               thisbrush_start = Collision_BrushForBox(&identitymatrix, boxstartmins, boxstartmaxs, 0, 0, NULL);
+               thisbrush_end = Collision_BrushForBox(&identitymatrix, boxendmins, boxendmaxs, 0, 0, NULL);
                for (i = 0, surface = model->data_surfaces;i < model->num_surfaces;i++, surface++)
                {
                        mesh = surface->groupmesh;
@@ -265,7 +265,7 @@ static void Mod_MDLMD2MD3_TraceBox(model_t *model, int frame, trace_t *trace, co
                                vertex3f = Z_Malloc(maxvertices * sizeof(float[3]));
                        }
                        Mod_Alias_GetMesh_Vertex3f(model, frameblend, mesh, vertex3f);
-                       Collision_TraceBrushTriangleMeshFloat(trace, thisbrush_start, thisbrush_end, mesh->num_triangles, mesh->data_element3i, vertex3f, SUPERCONTENTS_SOLID, segmentmins, segmentmaxs);
+                       Collision_TraceBrushTriangleMeshFloat(trace, thisbrush_start, thisbrush_end, mesh->num_triangles, mesh->data_element3i, vertex3f, SUPERCONTENTS_SOLID, 0, surface->texture, segmentmins, segmentmaxs);
                }
        }
 }
@@ -1796,10 +1796,10 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
                version = LittleLong(pchunk->version);
                recordsize = LittleLong(pchunk->recordsize);
                numrecords = LittleLong(pchunk->numrecords);
-               if (developer.integer)
+               if (developer.integer >= 100)
                        Con_Printf("%s: %s %x: %i * %i = %i\n", loadmodel->name, pchunk->id, version, recordsize, numrecords, recordsize * numrecords);
-               if (version != 0x1e83b9 && version != 0x1e9179 && version != 0x2e)
-                       Con_Printf ("%s: chunk %s has unknown version %x (0x1e83b9, 0x1e9179 and 0x2e are currently supported), trying to load anyway!\n", loadmodel->name, pchunk->id, version);
+               if (version != 0x1e83b9 && version != 0x1e9179 && version != 0x2e && version != 0x12f2bc && version != 0x12f2f0)
+                       Con_Printf ("%s: chunk %s has unknown version %x (0x1e83b9, 0x1e9179, 0x2e, 0x12f2bc, 0x12f2f0 are currently supported), trying to load anyway!\n", loadmodel->name, pchunk->id, version);
                if (!strcmp(pchunk->id, "ACTRHEAD"))
                {
                        // nothing to do
@@ -1966,10 +1966,10 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
                version = LittleLong(pchunk->version);
                recordsize = LittleLong(pchunk->recordsize);
                numrecords = LittleLong(pchunk->numrecords);
-               if (developer.integer)
+               if (developer.integer >= 100)
                        Con_Printf("%s: %s %x: %i * %i = %i\n", animname, pchunk->id, version, recordsize, numrecords, recordsize * numrecords);
-               if (version != 0x1e83b9 && version != 0x1e9179 && version != 0x2e)
-                       Con_Printf ("%s: chunk %s has unknown version %x (0x1e83b9, 0x1e9179 and 0x2e are currently supported), trying to load anyway!\n", animname, pchunk->id, version);
+               if (version != 0x1e83b9 && version != 0x1e9179 && version != 0x2e && version != 0x12f2bc && version != 0x12f2f0)
+                       Con_Printf ("%s: chunk %s has unknown version %x (0x1e83b9, 0x1e9179, 0x2e, 0x12f2bc, 0x12f2f0 are currently supported), trying to load anyway!\n", animname, pchunk->id, version);
                if (!strcmp(pchunk->id, "ANIMHEAD"))
                {
                        // nothing to do