From 81787e9004377016236865e95b95707ed6cf1d0b Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 2 Mar 2008 12:23:48 +0000 Subject: initial (buggy) support for .map models --- src/core/entity.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/core/entity.cc') 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 -- cgit v1.2.3