summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index da4eb336..04d06e38 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -33,25 +33,14 @@
#include "gui/minimap.h"
#include "gui/viewport.h"
-#ifdef EATHENA_SUPPORT
-#include "net/messageout.h"
-#include "net/ea/protocol.h"
-#endif
-
#include "resources/mapreader.h"
#include "resources/monsterdb.h"
#include "resources/resourcemanager.h"
#include "utils/stringutils.h"
-#ifdef TMWSERV_SUPPORT
Engine::Engine():
mCurrentMap(NULL)
-#else
-Engine::Engine(Network *network):
- mCurrentMap(NULL),
- mNetwork(network)
-#endif
{
}
@@ -60,7 +49,7 @@ Engine::~Engine()
delete mCurrentMap;
}
-void Engine::changeMap(const std::string &mapPath)
+bool Engine::changeMap(const std::string &mapPath)
{
// Clean up floor items, beings and particles
floorItemManager->clear();
@@ -77,11 +66,7 @@ void Engine::changeMap(const std::string &mapPath)
mMapName = mapPath;
// Store full map path in global var
-#ifdef TMWSERV_SUPPORT
map_path = "maps/" + mapPath + ".tmx";
-#else
- map_path = "maps/" + mapPath.substr(0, mapPath.rfind(".")) + ".tmx";
-#endif
ResourceManager *resman = ResourceManager::getInstance();
if (!resman->exists(map_path))
map_path += ".gz";
@@ -149,11 +134,7 @@ void Engine::changeMap(const std::string &mapPath)
mCurrentMap = newMap;
-#ifdef EATHENA_SUPPORT
- // Send "map loaded"
- MessageOut outMsg(mNetwork);
- outMsg.writeInt16(CMSG_MAP_LOADED);
-#endif
+ return true;
}
void Engine::logic()