From 346c90dde8c99df2c0b70911fe271f25b8970aa3 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 27 Jan 2011 00:00:44 +0000 Subject: [PATCH] Allow more particles, just in case. --- src/emitter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/emitter.cpp b/src/emitter.cpp index 5471225f..14d6b76a 100644 --- a/src/emitter.cpp +++ b/src/emitter.cpp @@ -25,12 +25,14 @@ class EmitterData { friend class Emitter; + static const int MAX_PARTICLES = 1000; + private: int tiler; float3 gravity; - int particles[100]; - float3 positions[100]; - float3 velocities[100]; + int particles[MAX_PARTICLES]; + float3 positions[MAX_PARTICLES]; + float3 velocities[MAX_PARTICLES]; int nparticles; }; @@ -77,7 +79,7 @@ void Emitter::TickDraw(float deltams) void Emitter::AddParticle(int id, float3 pos, float3 vel) { - if (data->nparticles >= 100) + if (data->nparticles >= EmitterData::MAX_PARTICLES) return; data->particles[data->nparticles] = id;