Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-16 14:31:02 +0000
committerStijn Buys <ingar@osirion.org>2008-02-16 14:31:02 +0000
commitd198b7b8d9ff713d891f35ab173d1f428f610e7d (patch)
tree6a1f76ee5788ee3dfac858e2c8233207637c01bc /src/game
parentd6ee7ec642cc6b3097c8d321a1a00630e24027d1 (diff)
code cleanup
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game.cc17
-rw-r--r--src/game/game.h1
2 files changed, 5 insertions, 13 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
diff --git a/src/game/game.h b/src/game/game.h
index 3811a06..7a6348e 100644
--- a/src/game/game.h
+++ b/src/game/game.h
@@ -46,7 +46,6 @@ public:
std::vector<Sector*> sectors;
private:
- std::string name;
std::string label;
std::string author;
};