mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Versioned map entity patches
This commit is contained in:
parent
7d01a1cc11
commit
5ae076ea2d
9 changed files with 24 additions and 10 deletions
|
@ -1,10 +1,10 @@
|
|||
INPUT := gfx/conback.lmp \
|
||||
maps/e1m1.ent \
|
||||
maps/e1m2.ent \
|
||||
maps/e1m4.ent \
|
||||
maps/e2m2.ent \
|
||||
maps/e2m3.ent \
|
||||
maps/e2m7.ent \
|
||||
maps/e1m1@c49d.ent \
|
||||
maps/e1m2@0caa.ent \
|
||||
maps/e1m4@958e.ent \
|
||||
maps/e2m2@fbfe.ent \
|
||||
maps/e2m3@237a.ent \
|
||||
maps/e2m7@10a8.ent \
|
||||
default.cfg
|
||||
|
||||
OUTPUT := quakespasm.pak
|
||||
|
|
|
@ -796,20 +796,34 @@ Mod_LoadEntities
|
|||
*/
|
||||
void Mod_LoadEntities (lump_t *l)
|
||||
{
|
||||
char basemapname[MAX_QPATH];
|
||||
char entfilename[MAX_QPATH];
|
||||
char *ents;
|
||||
int mark;
|
||||
unsigned int path_id;
|
||||
unsigned int crc = 0;
|
||||
|
||||
if (! external_ents.value)
|
||||
goto _load_embedded;
|
||||
|
||||
q_strlcpy(entfilename, loadmodel->name, sizeof(entfilename));
|
||||
COM_StripExtension(entfilename, entfilename, sizeof(entfilename));
|
||||
q_strlcat(entfilename, ".ent", sizeof(entfilename));
|
||||
Con_DPrintf2("trying to load %s\n", entfilename);
|
||||
if (l->filelen > 0)
|
||||
crc = CRC_Block(mod_base + l->fileofs, l->filelen);
|
||||
mark = Hunk_LowMark();
|
||||
|
||||
q_strlcpy(basemapname, loadmodel->name, sizeof(basemapname));
|
||||
COM_StripExtension(basemapname, basemapname, sizeof(basemapname));
|
||||
|
||||
q_snprintf(entfilename, sizeof(entfilename), "%s@%04x.ent", basemapname, crc);
|
||||
Con_DPrintf2("trying to load %s\n", entfilename);
|
||||
ents = (char *) COM_LoadHunkFile (entfilename, &path_id);
|
||||
|
||||
if (!ents)
|
||||
{
|
||||
q_snprintf(entfilename, sizeof(entfilename), "%s.ent", basemapname);
|
||||
Con_DPrintf2("trying to load %s\n", entfilename);
|
||||
ents = (char *) COM_LoadHunkFile (entfilename, &path_id);
|
||||
}
|
||||
|
||||
if (ents)
|
||||
{
|
||||
// use ent file only from the same gamedir as the map
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue