Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gameserver.h')
-rw-r--r--src/core/gameserver.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/core/gameserver.h b/src/core/gameserver.h
index a8d96db..57feac1 100644
--- a/src/core/gameserver.h
+++ b/src/core/gameserver.h
@@ -25,13 +25,17 @@ public:
GameServer();
virtual ~GameServer();
-/*----- inspectors ------------------------------------------------ */
+ /*----- inspectors ------------------------------------------------ */
/// returns true if the game server can run a time frime
- inline bool running() const { return server_running; }
+ inline bool running() const {
+ return server_running;
+ }
/// returns true if the game server can not run a time frime
- inline bool error() const { return !server_running; }
+ inline bool error() const {
+ return !server_running;
+ }
/// returns true if the game is running an interactive module
virtual bool interactive() const;
@@ -43,9 +47,11 @@ public:
virtual unsigned long timestamp() const;
/// current module
- inline const Module *module() const { return server_module; }
+ inline const Module *module() const {
+ return server_module;
+ }
-/*----- mutators -------------------------------------------------- */
+ /*----- mutators -------------------------------------------------- */
/// is called when a player connects to the game server
void player_connect(Player *player);
@@ -55,7 +61,7 @@ public:
/// run a game server time frame
void frame(unsigned long timestamp);
-
+
/// a player sends a chat message to the public channel
void say(Player *player, std::string const &args);
@@ -78,15 +84,19 @@ public:
void exec(Player *player, std::string const &cmdline);
/// time the server was started
- inline const unsigned long startup() const { return server_startup; }
+ inline const unsigned long startup() const {
+ return server_startup;
+ }
/// returns an info record
Info *info(const std::string &label);
-/*----- static ---------------------------------------------------- */
-
+ /*----- static ---------------------------------------------------- */
+
/// return the current game server
- static inline GameServer *instance() { return server_instance; }
+ static inline GameServer *instance() {
+ return server_instance;
+ }
protected:
/// abort runing
@@ -107,7 +117,10 @@ private:
unsigned long server_startup;
};
-inline GameServer *server() { return GameServer::instance(); }
+inline GameServer *server()
+{
+ return GameServer::instance();
+}
}