+ f = GETEDICTFIELDVALUE(ent, eval_color)->vector[0]*256;
+ cs.light[0] = (unsigned short)bound(0, f, 65535);
+ f = GETEDICTFIELDVALUE(ent, eval_color)->vector[1]*256;
+ cs.light[1] = (unsigned short)bound(0, f, 65535);
+ f = GETEDICTFIELDVALUE(ent, eval_color)->vector[2]*256;
+ cs.light[2] = (unsigned short)bound(0, f, 65535);
+ f = GETEDICTFIELDVALUE(ent, eval_light_lev)->_float;
+ cs.light[3] = (unsigned short)bound(0, f, 65535);
+ cs.lightstyle = (qbyte)GETEDICTFIELDVALUE(ent, eval_style)->_float;
+ cs.lightpflags = (qbyte)GETEDICTFIELDVALUE(ent, eval_pflags)->_float;
+
+ if (gamemode == GAME_TENEBRAE)
+ {
+ // tenebrae's EF_FULLDYNAMIC conflicts with Q2's EF_NODRAW
+ if (cs.effects & 16)
+ {
+ cs.effects &= ~16;
+ cs.lightpflags |= PFLAGS_FULLDYNAMIC;
+ }
+ // tenebrae's EF_GREEN conflicts with DP's EF_ADDITIVE
+ if (cs.effects & 32)
+ {
+ cs.effects &= ~32;
+ cs.light[0] = 0.2;
+ cs.light[1] = 1;
+ cs.light[2] = 0.2;
+ cs.light[3] = 200;
+ cs.lightpflags |= PFLAGS_FULLDYNAMIC;
+ }
+ }
+