Kill Texture SOC feature.

As far as I know it's basically unused, and the strstr is inherently unsafe because there's no guarantee that a patch's contents are NULL terminated.
This commit is contained in:
Sryder 2019-06-23 13:48:29 +01:00
parent 45922f80d1
commit bc254d9cf7
1 changed files with 19 additions and 30 deletions

View File

@ -484,16 +484,6 @@ void R_LoadTextures(void)
{
patchlump = W_CacheLumpNumPwad((UINT16)w, texstart + j, PU_CACHE);
// Then, check the lump directly to see if it's a texture SOC,
// and if it is, load it using dehacked instead.
if (strstr((const char *)patchlump, "TEXTURE"))
{
CONS_Alert(CONS_WARNING, "%s is a Texture SOC.\n", W_CheckNameForNumPwad((UINT16)w,texstart+j));
Z_Unlock(patchlump);
DEH_LoadDehackedLumpPwad((UINT16)w, texstart + j);
}
else
{
//CONS_Printf("\n\"%s\" is a single patch, dimensions %d x %d",W_CheckNameForNumPwad((UINT16)w,texstart+j),patchlump->width, patchlump->height);
texture = textures[i] = Z_Calloc(sizeof(texture_t) + sizeof(texpatch_t), PU_STATIC, NULL);
@ -521,7 +511,6 @@ void R_LoadTextures(void)
textureheight[i] = texture->height << FRACBITS;
}
}
}
}
static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch)