Fix export of NeL Flare

This commit is contained in:
kaetemi 2014-02-09 17:26:26 +01:00
parent bd206db383
commit ada9e8da5d
2 changed files with 6 additions and 4 deletions

View file

@ -41,8 +41,10 @@ IShape* CExportNel::buildFlare(INode& node, TimeValue time)
CExportNel::getValueByNameUsingParamBlock2(node, "PersistenceParam", (ParamType2)TYPE_FLOAT, &persistence, 0); CExportNel::getValueByNameUsingParamBlock2(node, "PersistenceParam", (ParamType2)TYPE_FLOAT, &persistence, 0);
fshape->setPersistence(persistence); fshape->setPersistence(persistence);
// retrieve spacing of the flare // retrieve spacing of the flare
CExportNel::getValueByNameUsingParamBlock2(node, "Spacing", (ParamType2)TYPE_FLOAT, &spacing, 0); bool hasSpacing = CExportNel::getValueByNameUsingParamBlock2(node, "Spacing", (ParamType2)TYPE_FLOAT, &spacing, 0)
fshape->setFlareSpacing(spacing); || CExportNel::getValueByNameUsingParamBlock2(node, "spacing", (ParamType2)TYPE_FLOAT, &spacing, 0);
if (hasSpacing) fshape->setFlareSpacing(spacing);
else nlwarning("FAILED CFlareShape Spacing");
// retrieve use of radial attenuation // retrieve use of radial attenuation
CExportNel::getValueByNameUsingParamBlock2(node, "Attenuable", (ParamType2) TYPE_BOOL, &attenuable, 0); CExportNel::getValueByNameUsingParamBlock2(node, "Attenuable", (ParamType2) TYPE_BOOL, &attenuable, 0);
if (attenuable) if (attenuable)

View file

@ -409,7 +409,7 @@ bool getValueByNameUsingParamBlock2Internal (Animatable& node, const char* sName
} }
else else
{ {
nldebug("Invalid type specified for pblock2 value with name '%s', given type '%u', found '%u'", nlwarning("Invalid type specified for pblock2 value with name '%s', given type '%u', found '%u'",
sName, (uint32)type, (uint32)paramType); sName, (uint32)type, (uint32)paramType);
} }
} }
@ -448,7 +448,7 @@ bool CExportNel::getValueByNameUsingParamBlock2 (Animatable& node, const char* s
} }
else else
{ {
// nlwarning ("Can't found ParamBlock named %s", sName); nlwarning ("FAILED Can't find ParamBlock named '%s'", sName);
return false; return false;
} }
} }