light: add -nolights option

This commit is contained in:
Eric Wasylishen 2016-07-27 02:00:11 -06:00
parent cbfe1e8ebf
commit a68979a57b
3 changed files with 10 additions and 0 deletions

View File

@ -668,6 +668,7 @@ extern qboolean onlyents;
extern qboolean scaledonly;
extern uint32_t *extended_texinfo_flags;
extern qboolean novis;
extern bool nolights;
typedef enum {
backend_bsp,

View File

@ -885,6 +885,11 @@ LoadEntities(const bsp2_t *bsp)
SetGlobalSetting(epair.first, epair.second, false);
}
assert(all_lights.size() == 0);
if (nolights) {
return;
}
/* go through all the entities */
for (const auto &entdict : entdicts) {

View File

@ -127,6 +127,7 @@ int write_litfile = 0; /* 0 for none, 1 for .lit, 2 for bspx, 3 for both */
int write_luxfile = 0; /* 0 for none, 1 for .lux, 2 for bspx, 3 for both */
qboolean onlyents = false;
qboolean novis = false; /* if true, don't use vis data */
bool nolights = false;
backend_t rtbackend = backend_embree;
debugmode_t debugmode = debugmode_none;
@ -1614,6 +1615,9 @@ main(int argc, const char **argv)
} else if ( !strcmp( argv[ i ], "-novis" ) ) {
novis = true;
logprint( "Skipping use of vis data to optimize lighting\n" );
} else if ( !strcmp( argv[ i ], "-nolights" ) ) {
nolights = true;
logprint( "Skipping all light entities (sunlight / minlight only)\n" );
} else if ( !strcmp( argv[ i ], "-backend" ) ) {
const char *requested = ParseString(&i, argc, argv);
if (!strcmp(requested, "bsp")) {