r3258 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Jan 24 16:09:26 EST 2008


Author: lordhavoc
Date: 2008-01-24 16:09:25 -0500 (Thu, 24 Jan 2008)
New Revision: 3258

Modified:
   trunk/data/qcsrc/server/g_triggers.qc
Log:
changed func_rain and func_snow behavior, their count field is now how
many particles to spawn in a 1024x1024 area, rather than total


Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc	2008-01-24 15:48:55 UTC (rev 3257)
+++ trunk/data/qcsrc/server/g_triggers.qc	2008-01-24 21:09:25 UTC (rev 3258)
@@ -469,7 +469,7 @@
 "cnt"
  sets color of rain (default 12 - white)
 "count"
- adjusts rain density, this many particles fall every second, experiment to see the effects (default is based on area size)
+ adjusts density, this many particles fall every second for a 1024x1024 area, default is 2000
 */
 void() func_rain =
 {
@@ -487,7 +487,8 @@
 	if (!self.cnt)
 		self.cnt = 12;
 	if (!self.count)
-		self.count = (self.absmax_x - self.absmin_x)*(self.absmax_y - self.absmin_y)/8192;
+		self.count = 2000;
+	self.count = 0.1 * self.count * (self.size_x / 1024) * (self.size_y / 1024);
 	if (self.count < 1)
 	{
 		remove(self);
@@ -502,7 +503,7 @@
 
 void() snow_think =
 {
-	self.nextthink = time + 0.1;
+	self.nextthink = time + 0.1 + random() * 0.05;
 	te_particlesnow(self.absmin, self.absmax, self.dest, self.count, self.cnt);
 //	WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
 //	WriteByte (MSG_BROADCAST, TE_PARTICLESNOW);
@@ -522,7 +523,7 @@
 "cnt"
  sets color of rain (default 12 - white)
 "count"
- adjusts snow density, this many particles fall every second, experiment to see the effects (default is based on area size)
+ adjusts density, this many particles fall every second for a 1024x1024 area, default is 2000
 */
 void() func_snow =
 {
@@ -540,7 +541,8 @@
 	if (!self.cnt)
 		self.cnt = 12;
 	if (!self.count)
-		self.count = (self.absmax_x - self.absmin_x)*(self.absmax_y - self.absmin_y)/8192;
+		self.count = 2000;
+	self.count = 0.1 * self.count * (self.size_x / 1024) * (self.size_y / 1024);
 	if (self.count < 1)
 	{
 		remove(self);




More information about the nexuiz-commits mailing list