diff --git a/include/light/light.hh b/include/light/light.hh index 2879a28d..b5a841d2 100644 --- a/include/light/light.hh +++ b/include/light/light.hh @@ -161,7 +161,8 @@ typedef enum { } debugmode_t; extern debugmode_t debugmode; - +extern bool verbose_log; + /* bounce lights */ typedef struct { diff --git a/light/entities.cc b/light/entities.cc index 216805c1..761463cd 100644 --- a/light/entities.cc +++ b/light/entities.cc @@ -109,7 +109,9 @@ LightStyleForTargetname(const std::string &targetname) const int newStylenum = LIGHT_TARGETS_START + lightstyleForTargetname.size(); lightstyleForTargetname[targetname] = newStylenum; - logprint("%s: Allocated %d for %s\n", __func__, newStylenum, targetname.c_str()); + if (verbose_log) { + logprint("%s: Allocated lightstyle %d for targetname '%s'\n", __func__, newStylenum, targetname.c_str()); + } return newStylenum; } diff --git a/light/light.cc b/light/light.cc index e1e60d91..e1312b1e 100644 --- a/light/light.cc +++ b/light/light.cc @@ -85,6 +85,7 @@ qboolean novisapprox = false; bool nolights = false; backend_t rtbackend = backend_embree; debugmode_t debugmode = debugmode_none; +bool verbose_log = false; uint32_t *extended_texinfo_flags = NULL; @@ -1489,6 +1490,8 @@ light_main(int argc, const char **argv) } else if ( !strcmp( argv[ i ], "-debugvert" ) ) { ParseVec3(dump_vert_point, &i, argc, argv); dump_vert = true; + } else if ( !strcmp( argv[ i ], "-verbose" ) ) { + verbose_log = true; } else if ( !strcmp( argv[ i ], "-help" ) ) { PrintUsage(); exit(0);