diff options
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index 99462b8..0a6a201 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -371,6 +371,7 @@ EntityControlable::EntityControlable(Player *owner, unsigned int flags) : EntityDynamic(flags) { entity_thrust = 0; + entity_movement = 0; target_direction = 0.0f; target_thrust = 0.0f; @@ -388,6 +389,7 @@ EntityControlable::EntityControlable(std::istream & is) : EntityDynamic(is) { entity_thrust = 0; + entity_movement = 0; target_direction = 0.0f; target_thrust = 0.0f; @@ -452,6 +454,7 @@ void EntityControlable::serialize_server_update(std::ostream & os) const { EntityDynamic::serialize_server_update(os); os << roundf(entity_thrust*100.0f) << " "; + os << roundf(entity_movement * 100.0f) << " "; } void EntityControlable::receive_server_update(std::istream &is) @@ -459,6 +462,8 @@ void EntityControlable::receive_server_update(std::istream &is) EntityDynamic::receive_server_update(is); is >> entity_thrust; entity_thrust /= 100.0f; + is >> entity_movement; + entity_movement /= 100.0f; } void EntityControlable::frame(float seconds) |