don't load floats as strings
This commit is contained in:
@@ -33,11 +33,9 @@ void MeterDisplay::LoadFromNode( const XNode* pNode )
|
|||||||
{
|
{
|
||||||
LOG->Trace( "MeterDisplay::LoadFromNode(%s,node)", ActorUtil::GetWhere(pNode).c_str() );
|
LOG->Trace( "MeterDisplay::LoadFromNode(%s,node)", ActorUtil::GetWhere(pNode).c_str() );
|
||||||
|
|
||||||
RString sExpr;
|
if( !pNode->GetAttrValue("StreamWidth", m_fStreamWidth) )
|
||||||
if( !pNode->GetAttrValue( "StreamWidth", sExpr ) )
|
|
||||||
RageException::Throw( "%s: MeterDisplay: missing the \"StreamWidth\" attribute", ActorUtil::GetWhere(pNode).c_str() );
|
RageException::Throw( "%s: MeterDisplay: missing the \"StreamWidth\" attribute", ActorUtil::GetWhere(pNode).c_str() );
|
||||||
|
|
||||||
m_fStreamWidth=StringToFloat(sExpr);
|
|
||||||
{
|
{
|
||||||
RString sStreamPath;
|
RString sStreamPath;
|
||||||
if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) )
|
if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) )
|
||||||
|
|||||||
Reference in New Issue
Block a user