Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-09 20:07:34 +0000
committerStijn Buys <ingar@osirion.org>2013-11-09 20:07:34 +0000
commitf1d6e358614d40f72047fe59ee255ea4f475bc9e (patch)
tree04d5aa50c205bd2607ea3708117aedf22e8fbbd6 /src
parent49b8e384b39dbfd25f510c91e610eb7f3bba4199 (diff)
Bugfixes in the entity print() functions.
Diffstat (limited to 'src')
-rw-r--r--src/core/entity.cc26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index ff780a5..5c1fe5c 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -266,7 +266,7 @@ void Entity::print() const
print_header();
// type
- con_print << " ^Ntype ^B";
+ con_print << " ^Ntype ^B";
switch (type()) {
case Default:
con_print << "entity";
@@ -291,7 +291,7 @@ void Entity::print() const
con_print << " ^Nmodule type ^B" << moduletype() << std::endl;
// print entity flags
- con_print << " ^Nflags ^B";
+ con_print << " ^Nflags ^B";
if (has_flag(NonSolid)) {
con_print << " nonsolid";
}
@@ -309,17 +309,17 @@ void Entity::print() const
}
con_print << std::endl;
if (inventory()) {
- con_print << " ^Ninventory ^Byes" << std::endl;
+ con_print << " ^Ninventory ^Byes" << std::endl;
}
if (faction()) {
- con_print << " ^Nfaction ^B" << faction()->label();
+ con_print << " ^Nfaction ^B" << faction()->label() << std::endl;
}
}
void Entity::print_header() const
{
con_print << " entity id ^B" << id() << " ^Nlabel ^B" << label() << " ^Nname ^B" << name();
- if (!zone()) {
+ if (zone()) {
con_print << " ^Nzone ^B" << zone()->label();
}
con_print << std::endl;
@@ -798,11 +798,15 @@ void EntityDynamic::print() const
{
Entity::print();
- con_print << " ^Nstate ^B";
+ con_print << " ^Nstate ^B";
switch (state()) {
case Normal:
con_print << "normal";
break;
+
+ case NoPower:
+ con_print << "nopower";
+ break;
case ImpulseInitiate:
con_print << "impulseinitiate";
@@ -820,17 +824,17 @@ void EntityDynamic::print() const
con_print << "jump";
break;
- case Destroyed:
- con_print << "destroyed";
+ case Docked:
+ con_print << "docked";
break;
- case NoPower:
- con_print << "nopower";
+ case Destroyed:
+ con_print << "destroyed";
break;
}
con_print << std::endl;
-
}
+
void EntityDynamic::set_state(int state)
{
if (this->state() != state) {