1
0
forked from mirrors/0ad

Updated ScEd.

This was SVN commit r2083.
This commit is contained in:
Ykkrosh
2005-03-30 02:06:00 +00:00
parent 8d6ebe1b1f
commit 827e06b8e4
2 changed files with 8 additions and 18 deletions
+5 -10
View File
@@ -68,28 +68,23 @@ CBaseEntity* CBaseEntityCollection::getTemplate( CStrW name )
newTemplate->loadBase();
}
else
{
LOG( WARNING, LOG_CATEGORY, "Parent template \"%ls\" does not exist in template \"%ls\"", newTemplate->m_Base_Name.c_str(), newTemplate->m_Tag.c_str() );
// (The requested entity will still be returned, but with no parent.
// Is this a reasonable thing to do?)
}
}
return newTemplate;
}
void CBaseEntityCollection::getTemplateNames( std::vector<CStrW>& names )
void CBaseEntityCollection::getBaseEntityNames( std::vector<CStrW>& names )
{
for( templateFilenameMap::iterator it = m_templateFilenames.begin(); it != m_templateFilenames.end(); ++it )
names.push_back( it->first );
if( ! (it->first.Length() > 8 && it->first.Left(8) == L"template"))
names.push_back( it->first );
}
#ifdef SCED
// TODO: Fix ScEd, so that it works
CBaseEntity* CBaseEntityCollection::getTemplateByID( int n )
{
return m_templates[n];
}
#endif
CBaseEntityCollection::~CBaseEntityCollection()
{
for( templateMap::iterator it = m_templates.begin(); it != m_templates.end(); ++it )