mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
collision: load ent file without has as backward compatibility
https://github.com/yquake2/yquake2/pull/1130#issuecomment-2256461447
This commit is contained in:
parent
e754261f22
commit
6247cf2692
1 changed files with 9 additions and 2 deletions
|
@ -1682,7 +1682,14 @@ CMod_LoadEntityString(const char *name, const char **map_entitystring, int *nume
|
||||||
bufLen = FS_LoadFile(entname, (void **)&buffer);
|
bufLen = FS_LoadFile(entname, (void **)&buffer);
|
||||||
if (buffer == NULL)
|
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)
|
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;
|
*map_entitystring = (const char *)cmod_base + l->fileofs;
|
||||||
|
|
Loading…
Reference in a new issue