diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-01 12:41:31 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-01 12:41:31 +0000 |
commit | f5266b403c50cb2b6d712e6d8f41b62ad2433efb (patch) | |
tree | fbd1cbafbb6d43b2fd5838cff8ce85df245bac86 /src/core/entity.cc | |
parent | e2b18c44a6ae38bb84f717c86988a80da137c3e7 (diff) |
lights
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index 475af39..b186c64 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -231,13 +231,19 @@ void EntityDynamic::recieve_client_update(std::istream &is) void EntityDynamic::serialize_server_update(std::ostream & os) const { - os << entity_location << " " << entity_axis << " " << entity_speed; + os << entity_location << " "; + os << entity_axis.forward() << " "; + os << entity_axis.left() << " "; + os << entity_axis.up() << " "; + os << entity_speed; } void EntityDynamic::recieve_server_update(std::istream &is) { is >> entity_location; - is >> entity_axis; + is >> entity_axis[0]; + is >> entity_axis[1]; + is >> entity_axis[2]; is >> entity_speed; } @@ -253,6 +259,7 @@ EntityControlable::EntityControlable(Player *player, unsigned int flags) : target_direction = 0.0f; target_thrust = 0.0f; + target_pitch = 0.0f; } EntityControlable::EntityControlable(std::istream & is) : @@ -285,13 +292,16 @@ void EntityControlable::serialize_client_update(std::ostream & os) const { EntityDynamic::serialize_client_update(os); os << " " << target_direction; + os << " " << target_pitch; os << " " << target_thrust; + } void EntityControlable::recieve_client_update(std::istream &is) { EntityDynamic::recieve_client_update(is); is >> target_direction; + is >> target_pitch; is >> target_thrust; } |