aboutsummaryrefslogtreecommitdiff
path: root/src/luaentity_common.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-12 15:14:24 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:40 +0200
commit75a0ca6bd67aa9ca87668bc27d36399b5028c2b1 (patch)
tree0ba77ad2aec19a52161c6a361e7f04b1aadf1512 /src/luaentity_common.cpp
parent38944467d31bbfa8a98008962f147cbc3c73f507 (diff)
downloadminetest-75a0ca6bd67aa9ca87668bc27d36399b5028c2b1.tar.gz
minetest-75a0ca6bd67aa9ca87668bc27d36399b5028c2b1.tar.bz2
minetest-75a0ca6bd67aa9ca87668bc27d36399b5028c2b1.zip
Scripting WIP
Diffstat (limited to 'src/luaentity_common.cpp')
-rw-r--r--src/luaentity_common.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/luaentity_common.cpp b/src/luaentity_common.cpp
index 6ce201236..26cfce1c2 100644
--- a/src/luaentity_common.cpp
+++ b/src/luaentity_common.cpp
@@ -40,9 +40,8 @@ std::string LuaEntityProperties::dump()
os<<", collisionbox="<<PP(collisionbox.MinEdge)<<","<<PP(collisionbox.MaxEdge);
os<<", visual="<<visual;
os<<", textures=[";
- for(core::list<std::string>::Iterator i = textures.begin();
- i != textures.end(); i++){
- os<<"\""<<(*i)<<"\" ";
+ for(u32 i=0; i<textures.size(); i++){
+ os<<"\""<<textures[i]<<"\" ";
}
os<<"]";
return os.str();
@@ -57,9 +56,8 @@ void LuaEntityProperties::serialize(std::ostream &os)
writeV3F1000(os, collisionbox.MaxEdge);
os<<serializeString(visual);
writeU16(os, textures.size());
- for(core::list<std::string>::Iterator i = textures.begin();
- i != textures.end(); i++){
- os<<serializeString(*i);
+ for(u32 i=0; i<textures.size(); i++){
+ os<<serializeString(textures[i]);
}
}
@@ -74,8 +72,8 @@ void LuaEntityProperties::deSerialize(std::istream &is)
collisionbox.MaxEdge = readV3F1000(is);
visual = deSerializeString(is);
textures.clear();
- int texture_count = readU16(is);
- for(int i=0; i<texture_count; i++){
+ u32 texture_count = readU16(is);
+ for(u32 i=0; i<texture_count; i++){
textures.push_back(deSerializeString(is));
}
}