collision: load ent file without has as backward compatibility

https://github.com/yquake2/yquake2/pull/1130#issuecomment-2256461447
This commit is contained in:
Denis Pauk 2024-07-29 22:56:44 +03:00
parent e754261f22
commit 6247cf2692
1 changed files with 9 additions and 2 deletions

View File

@ -1682,7 +1682,14 @@ CMod_LoadEntityString(const char *name, const char **map_entitystring, int *nume
bufLen = FS_LoadFile(entname, (void **)&buffer);
if (buffer == NULL)
{
Com_Printf("No fixes found for '%s'\n", entname);
Com_Printf("No fixes found as '%s'\n", entname);
snprintf(entname, sizeof(entname) -1, "%s.ent", namewe);
bufLen = FS_LoadFile(entname, (void **)&buffer);
if (buffer != NULL && bufLen > 1)
{
Com_Printf("Have used '%s' file without content hash.\n", entname);
}
}
}
@ -1711,7 +1718,7 @@ CMod_LoadEntityString(const char *name, const char **map_entitystring, int *nume
if (l->filelen < 0)
{
Com_Error(ERR_DROP, "%s: Map has too small entity lump", __func__);
Com_Error(ERR_DROP, "%s: Map %s has too small entity lump", __func__, name);
}
*map_entitystring = (const char *)cmod_base + l->fileofs;