summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <mana@crushnet.org>2010-03-04 21:27:16 +0100
committerPhilipp Sehmisch <mana@crushnet.org>2010-03-04 21:38:24 +0100
commitc176df1796a7b0fd53b52b52e8bd9d4a81ff8b1a (patch)
tree1b6a239f8fcc7f7834062e76ee2cdf125e9d426d /src/map.cpp
parent6e68568d9fb44762e4c3257b505e8b67ac1f70fe (diff)
downloadmana-client-c176df1796a7b0fd53b52b52e8bd9d4a81ff8b1a.tar.gz
mana-client-c176df1796a7b0fd53b52b52e8bd9d4a81ff8b1a.tar.bz2
mana-client-c176df1796a7b0fd53b52b52e8bd9d4a81ff8b1a.tar.xz
mana-client-c176df1796a7b0fd53b52b52e8bd9d4a81ff8b1a.zip
Implemented markers for warp portals defined in map files in form of particle effects. Reviewed-by: Jared Adams <jaxad0127@gmail.com>
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);
+ }
}
}
}