From a69521970793424754421c8a5fba2eb465e817e6 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 4 Feb 2011 13:23:05 +0000 Subject: Made time(), timestamp() and related methods non-virtual, corrects a crash when the dedicated server quits. --- src/core/gameconnection.h | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'src/core/gameconnection.h') diff --git a/src/core/gameconnection.h b/src/core/gameconnection.h index 89c3aff..fdd5daf 100644 --- a/src/core/gameconnection.h +++ b/src/core/gameconnection.h @@ -20,31 +20,10 @@ public: GameConnection(std::string const &connectionstr); virtual ~GameConnection(); - /*----- inspectors ------------------------------------------------ */ - - /// returns true if the game connection can run a time frime - inline bool running() const { - return connection_running; - } - - /// returns true if the game connection can not run a time frime - inline bool error() const { - return !connection_running; - } - - /// returns true if the game is running an interactive module - virtual bool interactive() const; - - /// return the current game time in seconds - virtual float time() const; - - /// return the current game time - virtual unsigned long timestamp() const; - /*----- mutators -------------------------------------------------- */ /// run a game connection time frame - void frame(unsigned long timestamp); + virtual void frame(unsigned long timestamp); /// forward a command line to the remote server void forward(std::string const &cmdline); @@ -64,7 +43,6 @@ public: /// request inventory for entity with id virtual Inventory *request_inventory(Entity *entity); - /*----- static ---------------------------------------------------- */ /// return the current game connection @@ -72,13 +50,7 @@ public: return connection_instance; } -protected: - /// abort runing - void abort(); - private: - bool connection_running; - unsigned long connection_timestamp; // server game time unsigned long connection_netframe; // last network frame timestamp NetConnection *connection_network; -- cgit v1.2.3