From 51ea7d94d99dfe1613f188a86db049f2b6764120 Mon Sep 17 00:00:00 2001 From: Marek Moeckel Date: Wed, 11 May 2005 14:49:28 +0000 Subject: [PATCH] testing ambient sound in level1 more work on rain particle system SVN-Revision: 2470 --- data/levels/world2/level1.stl | 6 +++++- src/object/particlesystem.cpp | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/data/levels/world2/level1.stl b/data/levels/world2/level1.stl index 40bd1629e..14f1e71f5 100644 --- a/data/levels/world2/level1.stl +++ b/data/levels/world2/level1.stl @@ -417,7 +417,11 @@ (spawnpoint "cave05") ) (spawnpoint (name "from_cave05") (x 4736) (y 1824)) - (ambient_sound (x 608) (y 160) (distance_factor "0.1") (distance_bias "20.0") (sample "rain")) + (ambient_sound (x 704) (y 0) (distance_factor 0.200000) (distance_bias 800.000000) (sample "rain")) + (zeekling (x 1641) (y 667)) + (zeekling (x 2690) (y 800)) + (ambient_sound (x 1696) (y 0) (distance_factor 0.200000) (distance_bias 800.000000) (sample "rain")) + (ambient_sound (x 2592) (y 0) (distance_factor 0.200000) (distance_bias 800.000000) (sample "rain")) ) (sector (name "bonuscaves") diff --git a/src/object/particlesystem.cpp b/src/object/particlesystem.cpp index 0869a1f3e..f3e518e62 100644 --- a/src/object/particlesystem.cpp +++ b/src/object/particlesystem.cpp @@ -34,6 +34,7 @@ #include "math/aatriangle.h" #include "collision.h" #include "collision_hit.h" +#include "object/camera.h" ParticleSystem::ParticleSystem() @@ -190,7 +191,7 @@ void RainParticleSystem::update(float elapsed_time) particle->pos.y += movement; particle->pos.x -= movement; if ((particle->pos.y > SCREEN_HEIGHT) || (collision(particle, Vector(-movement, movement)))) { - particle->pos.y = 0; + particle->pos.y = Sector::current()->camera->get_translation().y; particle->pos.x = rand() % int(virtual_width); } } -- 2.11.0