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>2009-08-18 09:24:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
commitf030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch)
treecd92baf9e4fa8a136523b9eb570e9811846c9250 /src/game/base/shipdealer.cc
parent5636fad174f0bcff857c357c394c4cc8d424b302 (diff)
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/game/base/shipdealer.cc')
-rw-r--r--src/game/base/shipdealer.cc19
1 files changed, 10 insertions, 9 deletions
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");
}