diff options
author | Stijn Buys <ingar@osirion.org> | 2009-06-29 18:22:07 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-06-29 18:22:07 +0000 |
commit | 024532b748b15a92303fd20c3b6a7062a37ca2ed (patch) | |
tree | a313dee0aed03c27582a68432e40b96ab90dfbed /src/core/entity.cc | |
parent | bf96f47d2c993112327f278eb2dd270b769e59aa (diff) |
client player list updates, short pif network messages, bump to network proto version 17
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index 5ddc149..731b13b 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -553,21 +553,26 @@ void EntityControlable::serialize_server_create(std::ostream & os) const void EntityControlable::receive_server_create(std::istream &is) { - int owner_id; - EntityDynamic::receive_server_create(is); + is >> entity_thrust; entity_thrust /= 100.0f; - if (is >> owner_id) { + + entity_owner = 0; + + int owner_id = 0; + is >> owner_id; + if (owner_id) { for (GameInterface::Players::iterator pit = game()->players().begin(); pit != game()->players().end(); pit++ ) { Player *player = (*pit); if (player->id() == owner_id) { entity_owner = player; - player->add_asset(this); } } - } else { - entity_owner = 0; + + if (!entity_owner) { + con_warn << "could not find owner " << owner_id << " for entity " << id() << "\n"; + } } } |