A really short tutorial this one, a quick hack to stop the fatal error
that occurs when you try to change the level to an incorrect version
BSP.
In gl_model.c, change
if (i != BSPVERSION)
Sys_Error ("Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
to:
if (i != BSPVERSION)
{
Con_Printf("Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
mod->numvertexes=-1; // HACK - incorrect BSP version is no longer fatal
return;
}
Now in sv_main.c, underneath:
if (!sv.worldmodel)
{
Con_Printf ("Couldn't spawn server %s\n", sv.modelname);
sv.active = false;
return;
}
add:
if (sv.worldmodel->numvertexes == -1)
{
Con_Printf ("Couldn't spawn server %s\n", sv.modelname);
sv.active = false;
return;
}
Compile the code. Now put a Quake2 BSP file (or any
other, as long as it isnt a Quake1 BSP) into your id1\maps folder, and
try load it. If everythings gone right, you should get dropped back to
the console instead of Quake crashing with an error. |