diff options
Diffstat (limited to 'src/game/game.cc')
-rw-r--r-- | src/game/game.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/game/game.cc b/src/game/game.cc index 7dff676..a9d5a6e 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -30,13 +30,9 @@ void func_join(core::Player &player, std::stringstream &args) ship->owner = &player; player.control = ship; - // net message std::ostringstream osstream; - osstream << "msg info " << player.name << " joins the game\n"; - core::net_broadcast(osstream, player.id); - - // console message - con_print << player.name << " joins the game" << std::endl; + osstream << player.name << " joins the game"; + core::message_broadcast(osstream.str(), player.id); } /// a player joins the spectators @@ -45,13 +41,9 @@ void func_spectate(core::Player &player, std::stringstream &args) if (!player.control) return; - // net message std::ostringstream osstream; - osstream << "msg info " << player.name << " spectates\n"; - core::net_broadcast(osstream, player.id); - - // console message - con_print << player.name << " spectates" << std::endl; + osstream << player.name << " spectates"; + core::message_broadcast(osstream.str(), player.id); if (player.control) { // player has only ship for now @@ -75,6 +67,7 @@ bool Game::init() //using filesystem::IniFile; con_print << "Initializing game..." << std::endl; + con_print << " " << name() << std::endl; /* // read game.ini |