summaryrefslogtreecommitdiff
path: root/src/game-server/state.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-10 14:17:38 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-10 14:17:38 +0000
commitf990980f80ab1523086edba1bed222741d716fa0 (patch)
tree0ce0257ca854ea06949f543227a301a7f553e1a9 /src/game-server/state.cpp
parentcb45a65e1020bf129225dd20c57bf64314cef2c8 (diff)
downloadmanaserv-f990980f80ab1523086edba1bed222741d716fa0.tar.gz
manaserv-f990980f80ab1523086edba1bed222741d716fa0.tar.bz2
manaserv-f990980f80ab1523086edba1bed222741d716fa0.tar.xz
manaserv-f990980f80ab1523086edba1bed222741d716fa0.zip
Improved helper functions for Lua scripts. Associated scripts to maps.
Diffstat (limited to 'src/game-server/state.cpp')
-rw-r--r--src/game-server/state.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp
index 513f7e6e..9262798f 100644
--- a/src/game-server/state.cpp
+++ b/src/game-server/state.cpp
@@ -39,6 +39,7 @@
#include "game-server/npc.hpp"
#include "game-server/trade.hpp"
#include "net/messageout.hpp"
+#include "scripting/script.hpp"
#include "utils/logger.h"
typedef std::map< Object *, DelayedEvent > DelayedEvents;
@@ -88,6 +89,10 @@ static void updateMap(MapComposite *map)
}
// 5. update the map itself.
+ if (Script *s = map->getScript())
+ {
+ s->update();
+ }
map->update();
}