Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-12-25 10:03:23 +0000
committerStijn Buys <ingar@osirion.org>2012-12-25 10:03:23 +0000
commit046afbe7a221d9c90775e6e2d980821103aaae70 (patch)
treed65b56be013a1f5be0348a976c93ab7894e0e76f /src/core
parentfee209b6769ee6b207e9101c4f15e16c0a67ad09 (diff)
Corrected an issue where entity health was not transferred when sending a create entity network message.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/entity.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index ff15e6e..4a603f1 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -1134,8 +1134,9 @@ void EntityControlable::set_thrust(float thrust)
void EntityControlable::serialize_server_create(std::ostream & os) const
{
EntityDynamic::serialize_server_create(os);
- os << roundf(entity_thrust*100.0f) << " "
- << (entity_owner ? entity_owner->id() : 0) << " ";
+ os << roundf(entity_thrust*100.0f) << " ";
+ os << (entity_owner ? entity_owner->id() : 0) << " ";
+ os << roundf(health()) << " ";
}
void EntityControlable::receive_server_create(std::istream &is)
@@ -1161,6 +1162,8 @@ void EntityControlable::receive_server_create(std::istream &is)
con_warn << "could not find owner " << owner_id << " for entity " << id() << "\n";
}
}
+
+ is >> entity_health;
}
void EntityControlable::serialize_client_update(std::ostream & os) const