From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/game/base/shipdealer.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/game/base/shipdealer.cc') diff --git a/src/game/base/shipdealer.cc b/src/game/base/shipdealer.cc index 408ae43..54d3e90 100644 --- a/src/game/base/shipdealer.cc +++ b/src/game/base/shipdealer.cc @@ -1,7 +1,7 @@ /* base/shipdealer.cc - This file is part of the Osirion project and is distributed under - the terms and conditions of the GNU General Public License version 2 + This file is part of the Osirion project and is distributed under + the terms and conditions of the GNU General Public License version 2 */ #include "auxiliary/functions.h" @@ -11,7 +11,8 @@ #include "base/station.h" #include "sys/sys.h" -namespace game { +namespace game +{ ShipDealer::ShipDealer() { @@ -67,7 +68,7 @@ ShipModel *ShipDealer::find(ShipModel *shipmodel) const void ShipDealer::func_buy(core::Player *player, const std::string &args) { core::Entity *dock = player->view(); - + ShipDealer *shipdealer = 0; // find the ship model @@ -102,7 +103,7 @@ void ShipDealer::func_buy(core::Player *player, const std::string &args) } if (!Game::g_devel->value()) { - + if (!shipdealer) { player->send("No ship dealer available"); return; @@ -116,7 +117,7 @@ void ShipDealer::func_buy(core::Player *player, const std::string &args) // check price if (shipmodel->price() > player->credits()) { std::stringstream msgstr; - msgstr << "You require " << (shipmodel->price() - player->credits()) << " additional credits to buy the " << shipmodel->name(); + msgstr << "You require " << (shipmodel->price() - player->credits()) << " additional credits to buy the " << shipmodel->name(); player->send(msgstr.str()); return; } @@ -135,7 +136,7 @@ void ShipDealer::func_buy(core::Player *player, const std::string &args) ship->get_location().assign(dock->location()); ship->set_state(core::Entity::Docked); ship->get_axis().assign(dock->axis()); - ship->get_axis().change_direction(180.0f); + ship->get_axis().change_direction(180.0f); player->set_control(ship); player->set_view(dock); } else { @@ -148,9 +149,9 @@ void ShipDealer::func_buy(core::Player *player, const std::string &args) msgstr << "^BPurchased " << aux::article(shipmodel->name()); if (!Game::g_devel->value()) { msgstr << " for " << shipmodel->price() << " credits"; - } + } player->send(msgstr.str()); - player->sound("game/buy-ship"); + player->sound("game/buy-ship"); } -- cgit v1.2.3