diff options
-rw-r--r-- | src/core/entity.cc | 7 |
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 |