3 self.nextthink = time + 0.1;
4 te_particlerain(self.absmin, self.absmax, self.destvec, self.count, self.cnt);
5 // te_particlesnow(self.absmin, self.absmax, self.destvec * 0.25, self.count, self.cnt);
6 // WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
7 // WriteByte (MSG_BROADCAST, TE_PARTICLERAIN);
8 // WriteVec (MSG_BROADCAST, self.absmin);
9 // WriteVec (MSG_BROADCAST, self.absmax);
10 // WriteVec (MSG_BROADCAST, self.destvec);
11 // WriteShort (MSG_BROADCAST, self.count);
12 // WriteByte (MSG_BROADCAST, self.cnt);
15 /*QUAKED func_rain (0 .5 .8) ?
16 This is an invisible area like a trigger, which rain falls inside of.
20 falling direction (should be something like '0 0 -700', use the X and Y velocity for wind)
22 sets color of rain (default 12 - white)
24 adjusts rain density, this many particles fall every second, experiment to see the effects (default is based on area size)
28 self.destvec = self.velocity;
29 self.velocity = '0 0 0';
31 self.destvec = '0 0 -700';
32 self.angles = '0 0 0';
33 self.movetype = MOVETYPE_NONE;
34 self.solid = SOLID_NOT;
35 setmodel(self, self.model);
36 setorigin(self, self.origin);
37 setsize(self, self.mins, self.maxs);
42 self.count = (self.absmax_x - self.absmin_x)*(self.absmax_y - self.absmin_y)/8192;
48 // convert from per second to per 0.1 sec,
49 self.count = ceil(self.count * 0.1);
50 self.think = rain_think;
51 self.nextthink = time + 0.5;
56 self.nextthink = time + 0.1;
57 te_particlesnow(self.absmin, self.absmax, self.destvec, self.count, self.cnt);
58 // WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
59 // WriteByte (MSG_BROADCAST, TE_PARTICLESNOW);
60 // WriteVec (MSG_BROADCAST, self.absmin);
61 // WriteVec (MSG_BROADCAST, self.absmax);
62 // WriteVec (MSG_BROADCAST, self.destvec);
63 // WriteShort (MSG_BROADCAST, self.count);
64 // WriteByte (MSG_BROADCAST, self.cnt);
67 /*QUAKED func_snow (0 .5 .8) ?
68 This is an invisible area like a trigger, which snow falls inside of.
72 falling direction (should be something like '0 0 -300', use the X and Y velocity for wind)
74 sets color of rain (default 12 - white)
76 adjusts snow density, this many particles fall every second, experiment to see the effects (default is based on area size)
80 self.destvec = self.velocity;
81 self.velocity = '0 0 0';
83 self.destvec = '0 0 -300';
84 self.angles = '0 0 0';
85 self.movetype = MOVETYPE_NONE;
86 self.solid = SOLID_NOT;
87 setmodel(self, self.model);
88 setorigin(self, self.origin);
89 setsize(self, self.mins, self.maxs);
94 self.count = (self.absmax_x - self.absmin_x)*(self.absmax_y - self.absmin_y)/8192;
100 // convert from per second to per 0.1 sec,
101 self.count = ceil(self.count * 0.1);
102 self.think = snow_think;
103 self.nextthink = time + 0.5;
106 void() particlecube_think =
108 self.nextthink = time + 0.1;
109 te_particlecube(self.absmin, self.absmax, self.destvec, self.count, self.cnt, (self.spawnflags & 1) != 0, self.cnt2);
110 // WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
111 // WriteByte (MSG_BROADCAST, TE_PARTICLECUBE);
112 // WriteVec (MSG_BROADCAST, self.absmin);
113 // WriteVec (MSG_BROADCAST, self.absmax);
114 // WriteVec (MSG_BROADCAST, self.destvec);
115 // WriteShort (MSG_BROADCAST, self.count);
116 // WriteByte (MSG_BROADCAST, self.cnt);
117 // if (self.spawnflags & 1)
118 // WriteByte (MSG_BROADCAST, 1);
120 // WriteByte (MSG_BROADCAST, 0);
121 // WriteCoord (MSG_BROADCAST, self.cnt2);
124 /*QUAKED func_particlecube (0 .5 .8) ? GRAVITY
125 This is an invisible area like a trigger, which particles spawn in.
129 if set the particles will fall.
133 particle velocity. (default is '0 0 0)
135 sets color of particles (default 12 - white), the colors are actually a range of 4 colors, starting with this color.
137 adjusts particle density, this many particles appear every second, experiment to see the effects (default is based on area size).
139 random velocity adjustment, default is 0, higher makes the particles more random, 0 makes them follow velocity exactly.
141 void() func_particlecube =
143 self.destvec = self.velocity;
144 self.velocity = '0 0 0';
145 self.angles = '0 0 0';
146 self.movetype = MOVETYPE_NONE;
147 self.solid = SOLID_NOT;
148 setmodel(self, self.model);
149 setorigin(self, self.origin);
150 setsize(self, self.mins, self.maxs);
155 self.count = (self.absmax_x - self.absmin_x)*(self.absmax_y - self.absmin_y)*(self.absmax_z - self.absmin_z)/65536;
161 // if (self.spawnflags & 1)
163 // convert from per second to per 0.1 sec,
164 // and round up to nearest multiple of 4
165 self.count = ((self.count * 0.1) + 3) & 65532;
166 self.think = particlecube_think;
167 self.nextthink = time + 0.5;