qbsp: Add support for _minlight_excludeN where N is in 2..9
This commit is contained in:
parent
af4deba237
commit
04601656ff
14
qbsp/map.cc
14
qbsp/map.cc
|
|
@ -313,9 +313,17 @@ FindTexinfoEnt(mtexinfo_t *texinfo, const mapentity_t *entity)
|
||||||
if (atoi(ValueForKey(entity, "_minlight")) == -1)
|
if (atoi(ValueForKey(entity, "_minlight")) == -1)
|
||||||
flags |= TEX_NOMINLIGHT;
|
flags |= TEX_NOMINLIGHT;
|
||||||
|
|
||||||
const char *excludeTex = ValueForKey(entity, "_minlight_exclude");
|
// "_minlight_exclude", "_minlight_exclude2", "_minlight_exclude3"...
|
||||||
if (strlen(excludeTex) > 0 && !Q_strcasecmp(texname, excludeTex)) {
|
for (int i = 0; i <= 9; i++) {
|
||||||
flags |= TEX_NOMINLIGHT;
|
std::string key = "_minlight_exclude";
|
||||||
|
if (i > 0) {
|
||||||
|
key += std::to_string(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* excludeTex = ValueForKey(entity, key.c_str());
|
||||||
|
if (strlen(excludeTex) > 0 && !Q_strcasecmp(texname, excludeTex)) {
|
||||||
|
flags |= TEX_NOMINLIGHT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shadow == -1)
|
if (shadow == -1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue