From 6fa44006e8a35205f4636309ad349668316ef030 Mon Sep 17 00:00:00 2001 From: janwas Date: Wed, 11 Aug 2004 20:18:30 +0000 Subject: [PATCH] remove mods/official from pathname (since Unpacker now uses the VFS) This was SVN commit r969. --- source/graphics/ObjectEntry.cpp | 17 +++++++---------- source/ps/World.cpp | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/source/graphics/ObjectEntry.cpp b/source/graphics/ObjectEntry.cpp index 1be898d417..7a584cb52c 100755 --- a/source/graphics/ObjectEntry.cpp +++ b/source/graphics/ObjectEntry.cpp @@ -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); } } diff --git a/source/ps/World.cpp b/source/ps/World.cpp index ebac3b2e35..d0f145b770 100755 --- a/source/ps/World.cpp +++ b/source/ps/World.cpp @@ -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;