From b344d0f5f2b31e3b01f47fe3e3c57d41315fabf7 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Sat, 17 Jun 2006 10:29:02 +0000 Subject: Started handling beings on maps. --- src/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') 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(); -- cgit v1.2.3-60-g2f50