diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/game.cc | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/src/game/game.cc b/src/game/game.cc index 8b70958..d2e5242 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -37,8 +37,9 @@ void func_join(core::Player *player, std::string const &args) player->player_control = new Ship(player, default_shipmodel); player->control()->entity_color = player->color(); - std::string message(player->name()); - message.append(" joins the game."); + std::string message("^B"); + message.append(player->name()); + message.append("^B joins the game."); core::server()->broadcast(message); player->player_dirty = true; @@ -50,8 +51,9 @@ void func_spectate(core::Player *player, std::string const &args) if (!player->player_control) return; - std::string message(player->name()); - message.append(" spectates."); + std::string message("^B"); + message.append(player->name()); + message.append("^B spectates."); core::server()->broadcast(message); if (player->control()) { @@ -80,7 +82,7 @@ void func_buy(core::Player *player, std::string const &args) } if (helpstr.size()) - helpstr += '|'; + helpstr.append("^N|^B"); helpstr.append((*smit)->modelname()); } @@ -94,10 +96,10 @@ void func_buy(core::Player *player, std::string const &args) player->player_control = new Ship(player, shipmodel); player->control()->entity_color = player->color(); - core::server()->broadcast(player->name() + " purchased " + aux::article(shipmodel->name())); + core::server()->broadcast("^N" + player->name() + " ^Bpurchased " + aux::article(shipmodel->name())); player->player_dirty = true; } else { - core::server()->send(player, "Usage: buy <" + helpstr + ">"); + core::server()->send(player, "Usage: buy <" + helpstr + "^N>"); } } /*----- Game ------------------------------------------------------ */ @@ -124,6 +126,8 @@ void Game::init() worldini.open("world"); if (!worldini.is_open()) { + con_error << "Could not open ini/world.ini!" << std::endl; + abort(); return; } @@ -205,9 +209,12 @@ void Game::init() // do not reuse the previous IniFile instance, some gcc versions do not like it filesystem::IniFile shipsini; shipsini.open("ships"); - if (!shipsini.is_open()) + if (!shipsini.is_open()) { + con_error << "Could not open ini/ships.ini!" << std::endl; + abort(); return; - + } + ShipModel *shipmodel = 0; default_shipmodel = 0; @@ -245,7 +252,7 @@ void Game::init() shipsini.close(); if (!default_shipmodel) { - con_error << "No default ship model\n"; + con_error << "No default ship model in ini/ships.ini!\n"; return; } @@ -258,7 +265,7 @@ void Game::init() core::Func::add("list_ship", (core::FuncPtr) func_list_ship); // add engine game variables - core::Cvar::set("g_borgcubes", "2", core::Cvar::Game); + core::Cvar::set("g_testgamevariable", "1", core::Cvar::Game); core::Cvar::set("g_name", name().c_str(), core::Cvar::Game | core::Cvar::ReadOnly); // indicate the module is ready to run frames |