Add ability to set phong in worldspawn #267 (#305)

This commit is contained in:
Julian Priestley 2020-11-30 07:42:42 +00:00 committed by GitHub
parent 6f99f469c6
commit 1b714108cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -219,7 +219,7 @@ public:
if (s != 0) {
return s;
}
if (phong.boolValue()) {
if (phong.intValue() > 0) {
return DEFAULT_PHONG_ANGLE;
}
return 0;
@ -281,6 +281,7 @@ public:
/* phong */
lockable_bool_t phongallowed;
lockable_vec_t phongangle;
/* bounce */
lockable_bool_t bounce;
@ -330,6 +331,7 @@ public:
/* phong */
phongallowed {"phong", true},
phongangle { "phong_angle", 0},
/* bounce */
bounce {"bounce", false},

View File

@ -335,6 +335,7 @@ FindModelInfo(const mbsp_t *bsp, const char *lmscaleoverride)
/* The world always casts shadows */
modelinfo_t *world = new modelinfo_t { bsp, &bsp->dmodels[0], lightmapscale };
world->shadow.setFloatValue(1.0f); /* world always casts shadows */
world->phong_angle = cfg_static.phongangle;
modelinfo.push_back(world);
tracelist.push_back(world);