X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fparticlesystem.cpp;h=b82152a13f4a3c8ef55962facfdc5069c184f42c;hb=5a542dea3c6043703683b68fcaa774f6cb0d9127;hp=ea301d871541eb899214d54c6fbe936ea40dc968;hpb=236df51d91f0845cd4e06b3269e262911d81f5db;p=supertux.git diff --git a/src/particlesystem.cpp b/src/particlesystem.cpp index ea301d871..b82152a13 100644 --- a/src/particlesystem.cpp +++ b/src/particlesystem.cpp @@ -18,6 +18,8 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#include + #include #include @@ -86,8 +88,9 @@ SnowParticleSystem::SnowParticleSystem() int snowsize = rand() % 3; particle->texture = snowimages[snowsize]; do { - particle->speed = snowsize/60.0 + (float(rand()%10)/300.0); - } while(particle->speed < 0.01); + particle->speed = snowsize*.2 + (float(rand()%10)*.4); + } while(particle->speed < 1); + particle->speed *= 10; // gravity particles.push_back(particle); } @@ -138,7 +141,7 @@ CloudParticleSystem::CloudParticleSystem() particle->pos.x = rand() % int(virtual_width); particle->pos.y = rand() % int(virtual_height); particle->texture = cloudimage; - particle->speed = -float(250 + rand() % 200) / 1000.0; + particle->speed = -float(25 + rand() % 30); particles.push_back(particle); }