summaryrefslogtreecommitdiff
path: root/source/cl_ents.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-03-03 19:39:22 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-03-03 19:39:22 +0000
commit8d5345be32ece1e2e396d2bd3499ded790cb9a8c (patch)
tree663dd8d43a5362dda8059613d980011dc2cc5b32 /source/cl_ents.c
parentbcabef4d17896c4dd5b4f0b67f26cabff4b167ea (diff)
Don't build client side dynamic lighting code unless software refresh is in use.
Renamed USE_DYNAMIC to USE_DLIGHTS.
Diffstat (limited to 'source/cl_ents.c')
-rw-r--r--source/cl_ents.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/cl_ents.c b/source/cl_ents.c
index fb99c82..33473d9 100644
--- a/source/cl_ents.c
+++ b/source/cl_ents.c
@@ -603,14 +603,16 @@ static void CL_AddPacketEntities( void ) {
}
else if (effects & EF_BFG)
{
- static const int bfg_lightramp[6] = {300, 400, 600, 300, 150, 75};
-
if (effects & EF_ANIM_ALLFAST) {
CL_BfgParticles (&ent);
+#if USE_DLIGHTS
i = 200;
} else {
+ static const int bfg_lightramp[6] = {300, 400, 600, 300, 150, 75};
+
i = s1->frame; clamp( i, 0, 5 );
i = bfg_lightramp[i];
+#endif
}
V_AddLight (ent.origin, i, 0, 1, 0);
}
@@ -619,8 +621,10 @@ static void CL_AddPacketEntities( void ) {
{
ent.origin[2] += 32;
CL_TrapParticles (&ent);
+#if USE_DLIGHTS
i = (rand()%100) + 100;
V_AddLight (ent.origin, i, 1, 0.8, 0.1);
+#endif
}
else if (effects & EF_FLAG1)
{
@@ -643,10 +647,12 @@ static void CL_AddPacketEntities( void ) {
{
if (effects & EF_TRACKER)
{
+#if USE_DLIGHTS
float intensity;
intensity = 50 + (500 * (sin(cl.time/500.0) + 1.0));
V_AddLight (ent.origin, intensity, -1.0, -1.0, -1.0);
+#endif
}
else
{
@@ -982,7 +988,9 @@ void CL_AddEntities( void ) {
CL_AddPacketEntities();
CL_AddTEnts();
CL_AddParticles();
+#if USE_DLIGHTS
CL_AddDLights();
+#endif
#if USE_LIGHTSTYLES
CL_AddLightStyles();
#endif