summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp
index da3f2185..24b3e84b 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -778,17 +778,22 @@ Path Map::findPath(int startX, int startY, int destX, int destY,
return path;
}
-void Map::addParticleEffect(const std::string &effectFile, int x, int y)
+void Map::addParticleEffect(const std::string &effectFile, int x, int y, int w, int h)
{
ParticleEffectData newEffect;
newEffect.file = effectFile;
newEffect.x = x;
newEffect.y = y;
+ newEffect.w = w;
+ newEffect.h = h;
particleEffects.push_back(newEffect);
+
}
void Map::initializeParticleEffects(Particle *particleEngine)
{
+ Particle *p;
+
if (config.getValue("particleeffects", 1))
{
for (std::list<ParticleEffectData>::iterator i = particleEffects.begin();
@@ -796,7 +801,11 @@ void Map::initializeParticleEffects(Particle *particleEngine)
i++
)
{
- particleEngine->addEffect(i->file, i->x, i->y);
+ p = particleEngine->addEffect(i->file, i->x, i->y);
+ if (i->w > 0 && i->h > 0)
+ {
+ p->adjustEmitterSize(i->w, i->h);
+ }
}
}
}