diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/Makefile.am | 2 | ||||
-rw-r--r-- | src/game/game.cc | 11 | ||||
-rw-r--r-- | src/game/game.h | 6 | ||||
-rw-r--r-- | src/game/player.h | 27 |
4 files changed, 17 insertions, 29 deletions
diff --git a/src/game/Makefile.am b/src/game/Makefile.am index f86c814..d327706 100644 --- a/src/game/Makefile.am +++ b/src/game/Makefile.am @@ -5,4 +5,4 @@ libgame_la_LDFLAGS = -avoid-version libgame_la_SOURCES = game.cc sector.cc ship.cc shipspecs.cc star.cc noinst_LTLIBRARIES = libgame.la -noinst_HEADERS = game.h player.h sector.h ship.h shipspecs.h star.h world.h +noinst_HEADERS = game.h sector.h ship.h shipspecs.h star.h world.h diff --git a/src/game/game.cc b/src/game/game.cc index f88c753..f8452f7 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -186,10 +186,19 @@ void Game::shutdown() void Game::frame(float seconds) { - } +void Game::player_connect(core::Player &player) +{ + std::stringstream args; + game::func_spectate(player, args); +} +void Game::player_disconnect(core::Player &player) +{ + std::stringstream args; + game::func_spectate(player, args); +} } // namespace game diff --git a/src/game/game.h b/src/game/game.h index d8a6185..3811a06 100644 --- a/src/game/game.h +++ b/src/game/game.h @@ -36,6 +36,12 @@ public: /// execute one game grame void frame(float seconds); + /// is called when a player connects + void player_connect(core::Player &player); + + /// is called when a player disconnects + void player_disconnect(core::Player &player); + /// sectors in space std::vector<Sector*> sectors; diff --git a/src/game/player.h b/src/game/player.h deleted file mode 100644 index 0fdec76..0000000 --- a/src/game/player.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - game/player.h - This file is part of the Osirion project and is distributed under - the terms and conditions of the GNU General Public License version 2 -*/ - -#ifndef __INCLUDED_GAME_PLAYER_H__ -#define __INCLUDED_GAME_PLAYER_H__ - -#include <string> - -namespace game { - -/// a player in the game -class Player { -public: - Player(); - ~Player(); - - /// name of the player - std::string name; -}; - -} // namespace game - -#endif // __INCLUDED_GAME_PLAYER_H__ - |