2 float rainsnow_SendEntity(entity to, float sf)
4 WriteByte(MSG_ENTITY, ENT_CLIENT_RAINSNOW);
5 WriteByte(MSG_ENTITY, self.state);
6 WriteCoord(MSG_ENTITY, self.origin_x + self.mins_x);
7 WriteCoord(MSG_ENTITY, self.origin_y + self.mins_y);
8 WriteCoord(MSG_ENTITY, self.origin_z + self.mins_z);
9 WriteCoord(MSG_ENTITY, self.maxs_x - self.mins_x);
10 WriteCoord(MSG_ENTITY, self.maxs_y - self.mins_y);
11 WriteCoord(MSG_ENTITY, self.maxs_z - self.mins_z);
12 WriteShort(MSG_ENTITY, compressShortVector(self.dest));
13 WriteShort(MSG_ENTITY, self.count);
14 WriteByte(MSG_ENTITY, self.cnt);
18 /*QUAKED spawnfunc_func_rain (0 .5 .8) ?
19 This is an invisible area like a trigger, which rain falls inside of.
23 falling direction (should be something like '0 0 -700', use the X and Y velocity for wind)
25 sets color of rain (default 12 - white)
27 adjusts density, this many particles fall every second for a 1024x1024 area, default is 2000
29 void spawnfunc_func_rain()
31 self.dest = self.velocity;
32 self.velocity = '0 0 0';
34 self.dest = '0 0 -700';
35 self.angles = '0 0 0';
36 self.movetype = MOVETYPE_NONE;
37 self.solid = SOLID_NOT;
38 SetBrushEntityModel();
43 self.count = 0.01 * self.count * (self.size_x / 1024) * (self.size_y / 1024);
46 if(self.count > 65535)
49 self.state = 1; // 1 is rain, 0 is snow
52 Net_LinkEntity(self, FALSE, 0, rainsnow_SendEntity);
56 /*QUAKED spawnfunc_func_snow (0 .5 .8) ?
57 This is an invisible area like a trigger, which snow falls inside of.
61 falling direction (should be something like '0 0 -300', use the X and Y velocity for wind)
63 sets color of rain (default 12 - white)
65 adjusts density, this many particles fall every second for a 1024x1024 area, default is 2000
67 void spawnfunc_func_snow()
69 self.dest = self.velocity;
70 self.velocity = '0 0 0';
72 self.dest = '0 0 -300';
73 self.angles = '0 0 0';
74 self.movetype = MOVETYPE_NONE;
75 self.solid = SOLID_NOT;
76 SetBrushEntityModel();
81 self.count = 0.01 * self.count * (self.size_x / 1024) * (self.size_y / 1024);
84 if(self.count > 65535)
87 self.state = 0; // 1 is rain, 0 is snow
90 Net_LinkEntity(self, FALSE, 0, rainsnow_SendEntity);