]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
The MCBSP header has been fixed but it will still crash your NASA lunar module landin...
authorsajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 10 Sep 2005 10:30:05 +0000 (10:30 +0000)
committersajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 10 Sep 2005 10:30:05 +0000 (10:30 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5709 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c
model_shared.c

index 505e7656f52ad49c24c912112bc47fad8437aab4..2fe152928fe09f1c7b0299e09d6c1df7dd2afc71 100644 (file)
@@ -2900,7 +2900,7 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
 
        mod->type = mod_brushq1;
 
-       if (!memcmp (buffer, "MCBSP", 5))
+       if (!memcmp (buffer, "MCBSPpad", 8))
        {
                qbyte   *index;
 
@@ -2910,7 +2910,7 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
                mod_base = (qbyte*)buffer;
 
                index = mod_base;
-               index += 5;
+               index += 8;
                i = LittleLong(*(int*)index); index += 4;
                if (i != MCBSPVERSION)
                        Host_Error("Mod_Q1BSP_Load: %s has wrong version number(%i should be %i)", mod->name, i, MCBSPVERSION);
index 40967880f6238a691c0d54c1cc108bc19ed61809..0d7122acfdd1a2ab0f9f8b95e1a0de06d4750e3b 100644 (file)
@@ -203,7 +203,7 @@ model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean checkdisk, qboolea
                else if (!memcmp(buf, "DARKPLACESMODEL", 16)) Mod_DARKPLACESMODEL_Load(mod, buf, bufend);
                else if (!strcmp(buf, "ACTRHEAD")) Mod_PSKMODEL_Load(mod, buf, bufend);
                else if (strlen(mod->name) >= 4 && !strcmp(mod->name - 4, ".map")) Mod_MAP_Load(mod, buf, bufend);
-               else if (!memcmp(buf, "MCBSP", 5)) Mod_Q1BSP_Load(mod, buf, bufend);
+               else if (!memcmp(buf, "MCBSPpad", 8)) Mod_Q1BSP_Load(mod, buf, bufend);
                else if (num == BSPVERSION || num == 30) Mod_Q1BSP_Load(mod, buf, bufend);
                else Con_Printf("Mod_LoadModel: model \"%s\" is of unknown/unsupported type\n", mod->name);
                Mem_Free(buf);