Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gameinterface.cc')
-rw-r--r--src/core/gameinterface.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/core/gameinterface.cc b/src/core/gameinterface.cc
index ce011dd..272c349 100644
--- a/src/core/gameinterface.cc
+++ b/src/core/gameinterface.cc
@@ -25,7 +25,7 @@ namespace core
void func_list_players(std::string const &args)
{
-
+
if (args.size()) {
Player *player = game()->find_player(args);
if (!player) {
@@ -44,22 +44,22 @@ const float MIN_DELTA = 10e-10;
Player GameInterface::game_localplayer;
EntityControlable *localcontrol()
-{
+{
if (game()->localplayer())
return game()->localplayer()->control();
else
return 0;
-
+
}
Player *localplayer()
-{
+{
return game()->localplayer();
}
GameInterface::GameInterface()
{
clear();
-
+
game_localplayer.clear();
if (Cvar::sv_dedicated->value()) {
game_localplayer.player_name.assign("Console");
@@ -107,7 +107,7 @@ void GameInterface::clear()
// remove all entities
for (Entity::Registry::iterator it = Entity::registry().begin(); it != Entity::registry().end(); it++) {
- delete (*it).second;
+ delete(*it).second;
}
Entity::registry().clear();
@@ -121,8 +121,8 @@ void GameInterface::clear()
// remove all game functions
for (Func::Registry::iterator it = Func::registry().begin(); it != Func::registry().end();) {
- if ( ((*it).second->flags() & Func::Game) == Func::Game) {
- delete (*it).second;
+ if (((*it).second->flags() & Func::Game) == Func::Game) {
+ delete(*it).second;
Func::registry().erase(it++);
} else {
++it;
@@ -130,9 +130,9 @@ void GameInterface::clear()
}
// remove all game cvars
- for (Cvar::Registry::iterator it = Cvar::registry().begin(); it != Cvar::registry().end(); ) {
- if ( ((*it).second->flags() & Cvar::Game) == Cvar::Game) {
- delete (*it).second;
+ for (Cvar::Registry::iterator it = Cvar::registry().begin(); it != Cvar::registry().end();) {
+ if (((*it).second->flags() & Cvar::Game) == Cvar::Game) {
+ delete(*it).second;
Cvar::registry().erase(it++);
} else {
++it;
@@ -194,10 +194,10 @@ void GameInterface::list_players()
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";
+ << 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";
if (player->zone())
con_print << aux::pad_left(player->zone()->name(), 24) << "^N";