Changed: Some improvements (only try to fix wrong filenames if right files don't exist)

This commit is contained in:
kervala 2015-12-20 19:06:38 +01:00
parent 25110257d4
commit 8f36a2c1e8
2 changed files with 54 additions and 30 deletions

View file

@ -458,27 +458,39 @@ void SCharacter3DSetup::setupFromCS_ModelCol (SLOTTYPE::EVisualSlot s, sint32 mo
tmpName.replace(posBottes+7, 0, "_" + orgType);
tmpName.replace(7, orgType.length(), "caster01");
// temporary hack because Fyros boots don't respect conventions
if (tmpName[0] == 'f')
{
if (tmpName[5] == 'f')
{
tmpName = "fy_hof_caster01_bottes_civil.shape";
}
else
{
tmpName = "fy_hom_caster01_civil01_bottes.shape";
}
}
// use fixed shape name only if file is present
if (CPath::exists(tmpName))
{
// use fixed shape name only if file is present
Parts[part].Name = tmpName;
}
else
{
nlwarning("File %s doesn't exist, use %s", tmpName.c_str(), Parts[part].Name.c_str());
// temporary hack because Fyros light boots don't respect conventions
if (tmpName[0] == 'f' && (item->ItemType == ITEM_TYPE::LIGHT_BOOTS))
{
if (tmpName[5] == 'f')
{
tmpName = "fy_hof_caster01_bottes_civil.shape";
}
else
{
tmpName = "fy_hom_caster01_civil01_bottes.shape";
}
// use fixed shape name only if file is present
if (CPath::exists(tmpName))
{
Parts[part].Name = tmpName;
}
else
{
nlwarning("File %s doesn't exist, use %s", tmpName.c_str(), Parts[part].Name.c_str());
}
}
else
{
nlwarning("File %s doesn't exist, use %s", tmpName.c_str(), Parts[part].Name.c_str());
}
}
}
}

View file

@ -569,27 +569,39 @@ void CPlayerCL::equip(SLOTTYPE::EVisualSlot slot, uint index, uint color)
tmpName.replace(posBottes+7, 0, "_" + orgType);
tmpName.replace(7, orgType.length(), "caster01");
// temporary hack because Fyros boots don't respect conventions
if (tmpName[0] == 'f')
{
if (tmpName[5] == 'f')
{
tmpName = "fy_hof_caster01_bottes_civil.shape";
}
else
{
tmpName = "fy_hom_caster01_civil01_bottes.shape";
}
}
// use fixed shape name only if file is present
if (CPath::exists(tmpName))
{
// use fixed shape name only if file is present
shapeName = tmpName;
}
else
{
nlwarning("File %s doesn't exist, use %s", tmpName.c_str(), shapeName.c_str());
// temporary hack because Fyros light boots don't respect conventions
if (tmpName[0] == 'f' && (item->ItemType == ITEM_TYPE::LIGHT_BOOTS))
{
if (tmpName[5] == 'f')
{
tmpName = "fy_hof_caster01_bottes_civil.shape";
}
else
{
tmpName = "fy_hom_caster01_civil01_bottes.shape";
}
// use fixed shape name only if file is present
if (CPath::exists(tmpName))
{
shapeName = tmpName;
}
else
{
nlwarning("File %s doesn't exist, use %s", tmpName.c_str(), shapeName.c_str());
}
}
else
{
nlwarning("File %s doesn't exist, use %s", tmpName.c_str(), shapeName.c_str());
}
}
}
}