1
0
forked from 0ad/0ad

remove mods/official from pathname (since Unpacker now uses the VFS)

This was SVN commit r969.
This commit is contained in:
janwas 2004-08-11 20:18:30 +00:00
parent 972596878e
commit 6fa44006e8
2 changed files with 8 additions and 11 deletions

View File

@ -42,17 +42,15 @@ bool CObjectEntry::BuildModel()
// remember the old model so we can replace any models using it later on
CModelDef* oldmodel=m_Model ? m_Model->GetModelDef() : 0;
// build filename
CStr modelfilename("mods/official/");
modelfilename+=m_ModelName;
// try and create a model
CModelDef* modeldef;
const char* modelfilename = m_ModelName.c_str();
try {
modeldef=CModelDef::Load((const char*) modelfilename);
modeldef=CModelDef::Load(modelfilename);
} catch (...) {
LOG(ERROR, "CObjectEntry::BuildModel(): Model %s failed to load", modelfilename.c_str());
LOG(ERROR, "CObjectEntry::BuildModel(): Model %s failed to load", modelfilename);
return false;
}
@ -69,9 +67,8 @@ bool CObjectEntry::BuildModel()
{
if( m_Animations[t].m_FileName.Length() > 0 )
{
CStr animfilename( "mods/official/" );
animfilename += m_Animations[t].m_FileName;
m_Animations[t].m_AnimData = m_Model->BuildAnimation((const char*) animfilename,m_Animations[t].m_Speed);
const char* animfilename = m_Animations[t].m_FileName.c_str();
m_Animations[t].m_AnimData = m_Model->BuildAnimation(animfilename,m_Animations[t].m_Speed);
if( m_Animations[t].m_AnimName.LowerCase() == CStr( "idle" ) )
m_IdleAnim = m_Animations[t].m_AnimData;
@ -105,7 +102,7 @@ bool CObjectEntry::BuildModel()
}
}
} else {
LOG(ERROR,"Failed to matching prop point called \"%s\" in model \"%s\"", (const char*)prop.m_PropPointName, (const char*)modelfilename);
LOG(ERROR,"Failed to matching prop point called \"%s\" in model \"%s\"", (const char*)prop.m_PropPointName, modelfilename);
}
}

View File

@ -18,7 +18,7 @@ void CWorld::Initialize(CGameAttributes *pAttribs)
{
g_EntityTemplateCollection.loadTemplates();
CStr mapfilename("mods/official/maps/scenarios/");
CStr mapfilename("maps/scenarios/");
mapfilename+=pAttribs->m_MapFile;
try {
CMapReader reader;