Changeset 625
- Timestamp:
- Dec 18, 2007, 8:28:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/loader/LevelLoader.cc
r616 r625 153 153 while( tNode = audioElem->IterateChildren( tNode ) ) 154 154 { 155 tElem = tNode->ToElement(); 156 std::string elemVal = tElem->Value(); 157 if (elemVal == "ogg") 158 { 159 auMan->ambientAdd(tElem->Attribute("src")); 160 } 155 if (tNode->Type() == TiXmlNode::ELEMENT) 156 { 157 tElem = tNode->ToElement(); 158 std::string elemVal = tElem->Value(); 159 if (elemVal == "ogg") 160 { 161 auMan->ambientAdd(tElem->Attribute("src")); 162 } 163 } 161 164 } 162 165 } … … 168 171 { 169 172 tNode = 0; 170 while( tNode = worldElem->IterateChildren( tNode ) ) 171 { 172 tElem = tNode->ToElement(); 173 orxonox::Identifier* id = ID(tElem->Value()); 174 if (id) 175 { 176 orxonox::BaseObject* obj = id->fabricate(); 177 obj->loadParams(tElem); 178 } 179 else 180 { 181 COUT(2) << "Warning: '"<< tElem->Value() <<"' is not a valid classname.\n"; 182 } 173 while (tNode = worldElem->IterateChildren(tNode)) 174 { 175 if (tNode->Type() == TiXmlNode::ELEMENT) 176 { 177 tElem = tNode->ToElement(); 178 orxonox::Identifier* id = ID(tElem->Value()); 179 if (id) 180 { 181 orxonox::BaseObject* obj = id->fabricate(); 182 obj->loadParams(tElem); 183 } 184 else 185 { 186 COUT(2) << "Warning: '"<< tElem->Value() <<"' is not a valid classname.\n"; 187 } 188 } 183 189 } 184 190 }
Note: See TracChangeset
for help on using the changeset viewer.