[Quake2world-dev] r83 - quake2world/trunk/src

jdolan at jdolan.dyndns.org jdolan at jdolan.dyndns.org
Sun Jan 4 02:55:15 UTC 2009


Author: jdolan
Date: 2009-01-04 02:55:15 +0000 (Sun, 04 Jan 2009)
New Revision: 83

Modified:
   quake2world/trunk/src/cl_entity.c
   quake2world/trunk/src/cl_view.c
   quake2world/trunk/src/r_main.c
Log:
Flush static lighting caches on r_reload/r_restart, because new lightmap data is available.

Modified: quake2world/trunk/src/cl_entity.c
===================================================================
--- quake2world/trunk/src/cl_entity.c	2009-01-04 02:00:59 UTC (rev 82)
+++ quake2world/trunk/src/cl_entity.c	2009-01-04 02:55:15 UTC (rev 83)
@@ -674,6 +674,11 @@
 		// setup the write-through lighting cache
 		ent.lighting = &cent->lighting;
 
+		if(r_view.update){  // new lighting information is available
+			memset(ent.lighting, 0, sizeof(*(ent.lighting)));
+			ent.lighting->dirty = true;
+		}
+
 		if(ent.skin)  // always re-light players
 			ent.lighting->dirty = true;
 

Modified: quake2world/trunk/src/cl_view.c
===================================================================
--- quake2world/trunk/src/cl_view.c	2009-01-04 02:00:59 UTC (rev 82)
+++ quake2world/trunk/src/cl_view.c	2009-01-04 02:55:15 UTC (rev 83)
@@ -292,8 +292,6 @@
 		cl_viewsize->modified = false;
 	}
 
-	r_view.update = false;
-
 	// set time in seconds
 	r_view.time = cl.time * 0.001;
 
@@ -313,6 +311,9 @@
 
 	// and client sided ents
 	Cl_AddEmits();
+
+	// we're done
+	r_view.update = false;
 }
 
 

Modified: quake2world/trunk/src/r_main.c
===================================================================
--- quake2world/trunk/src/r_main.c	2009-01-04 02:00:59 UTC (rev 82)
+++ quake2world/trunk/src/r_main.c	2009-01-04 02:55:15 UTC (rev 83)
@@ -388,6 +388,7 @@
 	}
 }
 
+
 /*
  * R_LoadMedia
  */



More information about the Quake2World-dev mailing list