mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
gl_model.c: Added new external_ents cvar for Mod_LoadEntities()
in parallel to the old QIP code. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@484 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
f43a0622f6
commit
b9ee5bef26
1 changed files with 8 additions and 0 deletions
|
@ -34,6 +34,8 @@ void Mod_LoadBrushModel (model_t *mod, void *buffer);
|
|||
void Mod_LoadAliasModel (model_t *mod, void *buffer);
|
||||
model_t *Mod_LoadModel (model_t *mod, qboolean crash);
|
||||
|
||||
cvar_t external_ents = {"external_ents", "1", true};
|
||||
|
||||
byte mod_novis[MAX_MAP_LEAFS/8];
|
||||
|
||||
#define MAX_MOD_KNOWN 2048 //johnfitz -- was 512
|
||||
|
@ -50,6 +52,8 @@ Mod_Init
|
|||
*/
|
||||
void Mod_Init (void)
|
||||
{
|
||||
Cvar_RegisterVariable (&external_ents, NULL);
|
||||
|
||||
memset (mod_novis, 0xff, sizeof(mod_novis));
|
||||
|
||||
//johnfitz -- create notexture miptex
|
||||
|
@ -720,6 +724,9 @@ void Mod_LoadEntities (lump_t *l)
|
|||
int mark;
|
||||
unsigned int path_id;
|
||||
|
||||
if (! external_ents.value)
|
||||
goto _load_embedded;
|
||||
|
||||
strcpy(entfilename, loadmodel->name);
|
||||
COM_StripExtension(entfilename, entfilename);
|
||||
strcat(entfilename, ".ent");
|
||||
|
@ -743,6 +750,7 @@ void Mod_LoadEntities (lump_t *l)
|
|||
}
|
||||
}
|
||||
|
||||
_load_embedded:
|
||||
if (!l->filelen)
|
||||
{
|
||||
loadmodel->entities = NULL;
|
||||
|
|
Loading…
Reference in a new issue