r4189 - in trunk/data: qcsrc/server scripts
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Aug 26 07:05:49 EDT 2008
Author: div0
Date: 2008-08-26 07:05:47 -0400 (Tue, 26 Aug 2008)
New Revision: 4189
Modified:
trunk/data/qcsrc/server/g_triggers.qc
trunk/data/scripts/entities.def
Log:
"wait" property
Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc 2008-08-26 11:01:01 UTC (rev 4188)
+++ trunk/data/qcsrc/server/g_triggers.qc 2008-08-26 11:05:47 UTC (rev 4189)
@@ -514,10 +514,24 @@
float pointparticles_use()
{
+ if(self.wait && time < self.nextthink)
+ {
+ self.nextthink = time + self.wait; // extend the time
+ return;
+ }
+
+ if(self.wait)
+ self.nextthink = time + self.wait; // toggle back after a delay
self.state = !self.state;
self.Version += 1;
}
+float pointparticles_think()
+{
+ self.state = !self.state;
+ self.Version += 1;
+}
+
void spawnfunc_func_pointparticles()
{
if(self.model != "")
@@ -540,6 +554,7 @@
self.state = 1;
else
self.state = 0;
+ self.think = pointparticles_think;
}
else
self.state = 1;
@@ -564,6 +579,7 @@
self.velocity = '0 0 -1';
self.mdl = "func_sparks";
self.impulse = 0.1 / self.wait;
+ self.wait = 0;
spawnfunc_func_pointparticles();
}
Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def 2008-08-26 11:01:01 UTC (rev 4188)
+++ trunk/data/scripts/entities.def 2008-08-26 11:05:47 UTC (rev 4189)
@@ -918,6 +918,8 @@
movedir: when set, trace direction (particles will then be emitted from the surface the trace hits); the length of the vector is used as strength of taking the normal of the trace into account
glow_color: particle palette color
noise: sound to play when the particle is emitted
+targetname: name to target this
+wait: when set and targeted, it will enable when triggered, and disable after a delay; otherwise, it will disable when triggered again
-------- SPAWNFLAGS --------
START_ON: when targeted, the particle emitter will start switched on
*/
More information about the nexuiz-commits
mailing list