Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void () place_weathernoise =
- {
- local vector sound1,sound2
- local float xfactor,yfactor,zfactor,xmax,ymax,zmax
- // X, Y and Z factor determine which value is the lowest of the 2, for purposes of bumping up the final calculation so that the cordinate is within the rainfall bounding box
- // X,Y and Z max determine which of the 2 are the larger values for purposes of calculating the max random number.
- //Determine X
- if (self.dest1_x > self.dest2_x)
- {
- xfactor = self.dest2_x;
- xmax = self.dest1_x;
- }
- if (self.dest1_x < self.dest2_x)
- {
- xfactor = self.dest1_x;
- xmax = self.dest2_x;
- }
- // Calculate Y
- if (self.dest1_y > self.dest2_y)
- {
- yfactor = self.dest2_y;
- ymax = self.dest1_y;
- }
- if (self.dest1_y < self.dest2_y)
- {
- yfactor = self.dest1_y;
- ymax = self.dest2_y;
- }
- // Calculate Z
- if (self.dest1_z > self.dest2_z)
- {
- zfactor = self.dest2_z;
- zmax = self.dest1_z;
- }
- if (self.dest1_z < self.dest2_z)
- {
- zfactor = self.dest1_z;
- zmax = self.dest2_z;
- }
- sound1_x = vrandom (xmax ) + xfactor;
- sound1_y = vrandom (ymax ) + yfactor;
- sound1_z = vrandom (zmax ) + zfactor;
- spawn_tfog (sound1);
- pointsound (sound1, "weather/nodrip1.wav", 1, 1);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement