diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-06-17 10:29:02 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-06-17 10:29:02 +0000 |
commit | b344d0f5f2b31e3b01f47fe3e3c57d41315fabf7 (patch) | |
tree | ca1d9be395c3934fd24c38f01f0099c7fa01be9b /src/main.cpp | |
parent | 6922c9e54bd495bd79ad5766fafcbff4e5565460 (diff) | |
download | manaserv-b344d0f5f2b31e3b01f47fe3e3c57d41315fabf7.tar.gz manaserv-b344d0f5f2b31e3b01f47fe3e3c57d41315fabf7.tar.bz2 manaserv-b344d0f5f2b31e3b01f47fe3e3c57d41315fabf7.tar.xz manaserv-b344d0f5f2b31e3b01f47fe3e3c57d41315fabf7.zip |
Started handling beings on maps.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 1b609f89..8a5dd5b6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -99,6 +99,9 @@ ChatChannelManager *chatChannelManager; /** Core game message handler */ GameHandler *gameHandler; +/** Global game state */ +tmwserv::State *gameState; + /** * Initializes the server. */ @@ -340,7 +343,7 @@ int main(int argc, char *argv[]) // // create state machine - State &state = State::instance(); + gameState = new State; // initialize world timer worldTimer.start(); @@ -365,7 +368,7 @@ int main(int argc, char *argv[]) chatHandler->process(); gameHandler->process(); // Update all active objects/beings - state.update(); + gameState->update(); // Send potentially urgent outgoing messages gameHandler->flush(); } @@ -374,6 +377,7 @@ int main(int argc, char *argv[]) LOG_INFO("Received: Quit signal, closing down...", 0); gameHandler->stopListen(); + delete gameState; chatHandler->stopListen(); accountHandler->stopListen(); deinitialize(); |