Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-07 22:52:17 +0000
committerStijn Buys <ingar@osirion.org>2013-11-07 22:52:17 +0000
commit3aa51da4ec976665a7e74bb659868d474400a101 (patch)
tree8996920adcb3af1e933feef24456116eb7911cdc /src/core/gameinterface.cc
parent87d5637c09dca61a650fe81d83ef328943176503 (diff)
Track the amount of time the player has spent,
make the 'impulse' command disable the autopilot.
Diffstat (limited to 'src/core/gameinterface.cc')
-rw-r--r--src/core/gameinterface.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/core/gameinterface.cc b/src/core/gameinterface.cc
index e7d7a31..a2d7fba 100644
--- a/src/core/gameinterface.cc
+++ b/src/core/gameinterface.cc
@@ -194,8 +194,6 @@ Player *GameInterface::find_player(const int playerid)
Player *GameInterface::find_player(const std::string &search)
{
- using aux::lowercase;
-
std::istringstream searchstr(search);
int id = 0;
if (searchstr >> id) {
@@ -210,7 +208,7 @@ Player *GameInterface::find_player(const std::string &search)
return 0;
for (std::list<Player *>:: iterator it = game_players.begin(); it != game_players.end(); it++) {
- if (aux::text_strip_lowercase((*it)->name()).find(lowercase(search)) != std::string::npos)
+ if (aux::text_strip_lowercase((*it)->name()).find(aux::lowercase(search)) != std::string::npos)
return (*it);
}
@@ -219,21 +217,20 @@ Player *GameInterface::find_player(const std::string &search)
void GameInterface::list_players()
{
- using namespace std;
int count = 0;
for (Players::iterator it = game_players.begin(); it != game_players.end(); it++) {
const Player *player = (*it);
- con_print << " "
- << aux::pad_left(player->name(), 24) << "^N "
- << "id^B" << setw(4) << player->id() << " "
- << "ping^B" << setw(4) << player->ping() << "^N "
- << "level^B" << setw(4) << player->level() << "^N";
+ con_print << " " << std::setfill(' ')
+ << aux::pad_left(player->name(), 24) << "^N "
+ << "id^B" << std::setw(4) << player->id() << " "
+ << "ping^B" << std::setw(4) << player->ping() << "^N "
+ << "level^B" << std::setw(4) << player->level() << "^N";
if (player->zone())
con_print << aux::pad_left(player->zone()->name(), 24) << "^N";
- con_print << std::endl;
+ con_print << std::endl;
count++;
}