From be83b37e1e039f65cc013266938f95468ff6f23a Mon Sep 17 00:00:00 2001 From: sajt Date: Sat, 10 Sep 2005 10:30:05 +0000 Subject: [PATCH] The MCBSP header has been fixed but it will still crash your NASA lunar module landing mainframe git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5709 d7cf8633-e32d-0410-b094-e92efae38249 --- model_brush.c | 4 ++-- model_shared.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model_brush.c b/model_brush.c index 505e7656..2fe15292 100644 --- a/model_brush.c +++ b/model_brush.c @@ -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); diff --git a/model_shared.c b/model_shared.c index 40967880..0d7122ac 100644 --- a/model_shared.c +++ b/model_shared.c @@ -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); -- 2.39.2