>>99178508Source might be "close" but it WILL NOT HAPPEN if YOU DO NOT HELP
[code:lit]
8094 // Valve BSP loader
8095 // Cloudwalk: Wasn't sober when I wrote this. I screamed and ran away at the face loader
8096 void Mod_VBSP_Load(model_t *mod, void *buffer, void *bufferend)
8097 {
8098 static cvar_t *testing = NULL; // TEMPORARY
8099 int i;
8100 sizebuf_t sb;
8101 sizebuf_t lumpsb[HL2HEADER_LUMPS];
8102
8103 if(!testing || !testing->integer)
8104 {
8105 if(!testing)
8106 testing = Cvar_Get(&cvars_all, "mod_bsp_vbsptest", "0", CF_CLIENT | CF_SERVER, "uhhh");
8107 Host_Error("Mod_VBSP_Load: not yet fully implemented. Change the now-generated \"mod_bsp_vbsptest\" to 1 if you wish to test this");
8108 }
8109 else
8110 {
8111
8112 MSG_InitReadBuffer(&sb, (unsigned char *)buffer, (unsigned char *)bufferend - (unsigned char *)buffer);
8113
8114 mod->type = mod_brushhl2;
8115
8116 MSG_ReadLittleLong(&sb);
8117 MSG_ReadLittleLong(&sb); // TODO version check
8118
8119 mod->modeldatatypestring = "VBSP";
8120
8121 // read lumps
8122 for (i = 0; i < HL2HEADER_LUMPS; i++)
8123 {
8124 int offset = MSG_ReadLittleLong(&sb);
8125 int size = MSG_ReadLittleLong(&sb);
8126 MSG_ReadLittleLong(&sb); // TODO support version
8127 MSG_ReadLittleLong(&sb); // TODO support ident
[/code:lit]