qbsp: Add support for _minlight_excludeN where N is in 2..9
This commit is contained in:
parent
af4deba237
commit
04601656ff
10
qbsp/map.cc
10
qbsp/map.cc
|
|
@ -313,10 +313,18 @@ FindTexinfoEnt(mtexinfo_t *texinfo, const mapentity_t *entity)
|
|||
if (atoi(ValueForKey(entity, "_minlight")) == -1)
|
||||
flags |= TEX_NOMINLIGHT;
|
||||
|
||||
const char *excludeTex = ValueForKey(entity, "_minlight_exclude");
|
||||
// "_minlight_exclude", "_minlight_exclude2", "_minlight_exclude3"...
|
||||
for (int i = 0; i <= 9; i++) {
|
||||
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)
|
||||
flags |= TEX_NOSHADOW;
|
||||
|
|
|
|||
Loading…
Reference in New Issue