Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc13
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