diff options
author | Stijn Buys <ingar@osirion.org> | 2008-03-02 12:23:48 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-03-02 12:23:48 +0000 |
commit | 81787e9004377016236865e95b95707ed6cf1d0b (patch) | |
tree | b8a7bd0d51f97848ad98ec8c8f5e424de910df32 /src/core/entity.cc | |
parent | 1d45d8ecb4633f07a0ff163255dbedc3c3a72ac8 (diff) |
initial (buggy) support for .map models
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index a0da4ea..2fe381b 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -113,15 +113,19 @@ Entity::Entity(std::istream & is) is >> s; // shape is >> entity_radius; is >> entity_direction; + entity_shape = (Shape) s ; char c; while ( (is.get(c)) && (c != '"')); while ( (is.get(c)) && (c != '"')) - n += c; - - entity_shape = (Shape) s ; + n += c; entity_name = n; + while ( (is.get(c)) && (c != '"')); + while ( (is.get(c)) && (c != '"')) + n += c; + entity_modelname = n; + entity_created = true; entity_destroyed = false; entity_dirty = false; @@ -144,7 +148,8 @@ void Entity::serialize(std::ostream & os) const << entity_shape << " " << entity_radius << " " << entity_direction << " " - << "\"" << entity_name << "\""; + << "\"" << entity_name << "\" " + << "\"" << entity_modelname << "\""; } void Entity::serialize_client_update(std::ostream & os) const |