From f5266b403c50cb2b6d712e6d8f41b62ad2433efb Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 1 May 2008 12:41:31 +0000 Subject: lights --- src/core/entity.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/core/entity.cc') 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; } -- cgit v1.2.3