From a353543dd4da3c489a84f6f17125fdd0e1be2349 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 4 Jun 2007 21:48:47 +0000 Subject: Merged 0.0 changes from revision 3234 to 3317 to trunk. --- src/engine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/engine.cpp') diff --git a/src/engine.cpp b/src/engine.cpp index 31bec9ff..3b5fb403 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -35,6 +35,7 @@ #include "localplayer.h" #include "log.h" #include "map.h" +#include "particle.h" #include "sound.h" #include "gui/gui.h" @@ -63,6 +64,7 @@ void Engine::changeMap(const std::string &mapPath) floorItemManager->clear(); beingManager->clear(); + particleEngine->clear(); // Store full map path in global var map_path = "maps/" + mapPath; @@ -83,8 +85,12 @@ void Engine::changeMap(const std::string &mapPath) } minimap->setMapImage(mapImage); beingManager->setMap(newMap); + particleEngine->setMap(newMap); viewport->setMap(newMap); + // Initialize map-based particle effects + newMap->initializeParticleEffects(particleEngine); + // Start playing new music file when necessary std::string oldMusic = ""; @@ -106,5 +112,6 @@ void Engine::changeMap(const std::string &mapPath) void Engine::logic() { beingManager->logic(); + particleEngine->update(); gui->logic(); } -- cgit v1.2.3-70-g09d2