1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-21 12:49:10 +00:00

Convert plUoid's object name to a plString

This commit is contained in:
2012-01-28 16:24:20 -08:00
parent 442a733fbb
commit e34414889f
122 changed files with 810 additions and 842 deletions

View File

@ -80,16 +80,16 @@ void plProxyGen::Init(const hsKeyedObject* owner)
{
if( !GetKey() )
{
char buff[256];
plString buff;
plLocation loc;
if( owner->GetKey() )
{
sprintf(buff, "%s_%s_%d_%d", owner->GetKey()->GetName(), "ProxyGen", owner->GetKey()->GetUoid().GetClonePlayerID(), fProxyKeyCounter++);
buff = plString::Format("%s_ProxyGen_%d_%d", owner->GetKey()->GetName().c_str(), owner->GetKey()->GetUoid().GetClonePlayerID(), fProxyKeyCounter++);
loc = owner->GetKey()->GetUoid().GetLocation();
}
else
{
sprintf( buff, "ProxyGen%d", fProxyKeyCounter++ );
buff = plString::Format( "ProxyGen%d", fProxyKeyCounter++ );
loc = plLocation::kGlobalFixedLoc;
}
@ -157,11 +157,11 @@ hsGMaterial* plProxyGen::IMakeProxyMaterial() const
hsGMaterial* retVal = TRACKED_NEW hsGMaterial();
char buff[256];
if( GetKey()->GetName() )
sprintf(buff, "%s_%s", GetKey()->GetName(), "Material");
plString buff;
if( !GetKey()->GetName().IsNull() )
buff = plString::Format("%s_Material", GetKey()->GetName().c_str());
else
strcpy(buff, "ProxyMaterial");
buff = _TEMP_CONVERT_FROM_LITERAL("ProxyMaterial");
hsgResMgr::ResMgr()->NewKey( buff, retVal, GetKey() ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
plLayer *lay = retVal->MakeBaseLayer();
@ -232,11 +232,11 @@ void plProxyGen::IGenerateProxy()
if( fProxyDrawables[idx] && !fProxyDrawables[idx]->GetKey() )
{
char buff[256];
if( GetKey()->GetName() )
sprintf(buff, "%s_%s", GetKey()->GetName(), "ProxyDrawable");
plString buff;
if( !GetKey()->GetName().IsNull() )
buff = plString::Format("%s_ProxyDrawable", GetKey()->GetName().c_str());
else
strcpy(buff, "ProxyDrawable");
buff = _TEMP_CONVERT_FROM_LITERAL("ProxyDrawable");
hsgResMgr::ResMgr()->NewKey( buff, fProxyDrawables[ idx ], GetKey() ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
}