]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_alias.c
bump modplug version to libmodplug-1.dll (only supports 0.8.8 upwards, sorry, but...
[xonotic/darkplaces.git] / model_alias.c
index 01a01fa43061f4c44f72338af2f7d10022cfaa1b..9cf5e50c9e655c508700f962fc935ae784e5e5b5 100644 (file)
@@ -1323,7 +1323,7 @@ void Mod_IDP0_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        if (!loadmodel->surfmesh.isanimated)
        {
-               Mod_MakeCollisionBIH(loadmodel, true);
+               Mod_MakeCollisionBIH(loadmodel, true, &loadmodel->collision_bih);
                loadmodel->TraceBox = Mod_CollisionBIH_TraceBox;
                loadmodel->TraceLine = Mod_CollisionBIH_TraceLine;
                loadmodel->TracePoint = Mod_CollisionBIH_TracePoint_Mesh;
@@ -1580,7 +1580,7 @@ void Mod_IDP2_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        if (!loadmodel->surfmesh.isanimated)
        {
-               Mod_MakeCollisionBIH(loadmodel, true);
+               Mod_MakeCollisionBIH(loadmodel, true, &loadmodel->collision_bih);
                loadmodel->TraceBox = Mod_CollisionBIH_TraceBox;
                loadmodel->TraceLine = Mod_CollisionBIH_TraceLine;
                loadmodel->TracePoint = Mod_CollisionBIH_TracePoint_Mesh;
@@ -1760,7 +1760,7 @@ void Mod_IDP3_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        if (!loadmodel->surfmesh.isanimated)
        {
-               Mod_MakeCollisionBIH(loadmodel, true);
+               Mod_MakeCollisionBIH(loadmodel, true, &loadmodel->collision_bih);
                loadmodel->TraceBox = Mod_CollisionBIH_TraceBox;
                loadmodel->TraceLine = Mod_CollisionBIH_TraceLine;
                loadmodel->TracePoint = Mod_CollisionBIH_TracePoint_Mesh;
@@ -2132,7 +2132,7 @@ void Mod_ZYMOTICMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        if (!loadmodel->surfmesh.isanimated)
        {
-               Mod_MakeCollisionBIH(loadmodel, true);
+               Mod_MakeCollisionBIH(loadmodel, true, &loadmodel->collision_bih);
                loadmodel->TraceBox = Mod_CollisionBIH_TraceBox;
                loadmodel->TraceLine = Mod_CollisionBIH_TraceLine;
                loadmodel->TracePoint = Mod_CollisionBIH_TracePoint_Mesh;
@@ -2482,7 +2482,7 @@ void Mod_DARKPLACESMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        if (!loadmodel->surfmesh.isanimated)
        {
-               Mod_MakeCollisionBIH(loadmodel, true);
+               Mod_MakeCollisionBIH(loadmodel, true, &loadmodel->collision_bih);
                loadmodel->TraceBox = Mod_CollisionBIH_TraceBox;
                loadmodel->TraceLine = Mod_CollisionBIH_TraceLine;
                loadmodel->TracePoint = Mod_CollisionBIH_TracePoint_Mesh;
@@ -3063,7 +3063,7 @@ void Mod_PSKMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        if (!loadmodel->surfmesh.isanimated)
        {
-               Mod_MakeCollisionBIH(loadmodel, true);
+               Mod_MakeCollisionBIH(loadmodel, true, &loadmodel->collision_bih);
                loadmodel->TraceBox = Mod_CollisionBIH_TraceBox;
                loadmodel->TraceLine = Mod_CollisionBIH_TraceLine;
                loadmodel->TracePoint = Mod_CollisionBIH_TracePoint_Mesh;
@@ -3129,6 +3129,7 @@ void Mod_INTERQUAKEMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
        header->num_frames = LittleLong(header->num_frames);
        header->num_framechannels = LittleLong(header->num_framechannels);
        header->ofs_frames = LittleLong(header->ofs_frames);
+       header->ofs_bounds = LittleLong(header->ofs_bounds);
        header->num_comment = LittleLong(header->num_comment);
        header->ofs_comment = LittleLong(header->ofs_comment);
        header->num_extensions = LittleLong(header->num_extensions);
@@ -3154,6 +3155,7 @@ void Mod_INTERQUAKEMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
                pbase + header->ofs_poses + header->num_poses*sizeof(iqmpose_t) > pend ||
                pbase + header->ofs_anims + header->num_anims*sizeof(iqmanim_t) > pend ||
                pbase + header->ofs_frames + header->num_frames*header->num_framechannels*sizeof(unsigned short) > pend ||
+               (header->ofs_bounds && pbase + header->ofs_bounds + header->num_frames*sizeof(iqmbounds_t) > pend) ||
                pbase + header->ofs_comment + header->num_comment > pend)
        {
                Con_Printf("%s has invalid size or offset information\n", loadmodel->name);
@@ -3555,7 +3557,7 @@ void Mod_INTERQUAKEMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        if (!loadmodel->surfmesh.isanimated)
        {
-               Mod_MakeCollisionBIH(loadmodel, true);
+               Mod_MakeCollisionBIH(loadmodel, true, &loadmodel->collision_bih);
                loadmodel->TraceBox = Mod_CollisionBIH_TraceBox;
                loadmodel->TraceLine = Mod_CollisionBIH_TraceLine;
                loadmodel->TracePoint = Mod_CollisionBIH_TracePoint_Mesh;