1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +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

@ -493,7 +493,7 @@ hsBool plPXPhysical::Init(PhysRecipe& recipe)
}
actorDesc.userData = this;
actorDesc.name = GetKeyName();
actorDesc.name = GetKeyName().c_str();
// Put the dynamics into actor group 1. The actor groups are only used for
// deciding who we get contact reports for.
@ -617,7 +617,7 @@ hsBool plPXPhysical::HandleRefMsg(plGenRefMsg* refMsg)
plKey ourKey = GetKey();
PhysRefType refType = PhysRefType(refMsg->fType);
const char* refKeyName = refKey ? refKey->GetName() : "MISSING";
plString refKeyName = refKey ? refKey->GetName() : _TEMP_CONVERT_FROM_LITERAL("MISSING");
if (refType == kPhysRefWorld)
{
@ -695,11 +695,11 @@ plPhysical& plPXPhysical::SetProperty(int prop, hsBool status)
case plSimulationInterface::kNoSynchronize: propName = "kNoSynchronize"; break;
}
const char* name = "(unknown)";
plString name = _TEMP_CONVERT_FROM_LITERAL("(unknown)");
if (GetKey())
name = GetKeyName();
if (plSimulationMgr::fExtraProfile)
plSimulationMgr::Log("Warning: Redundant physical property set (property %s, value %s) on %s", propName, status ? "true" : "false", name);
plSimulationMgr::Log("Warning: Redundant physical property set (property %s, value %s) on %s", propName, status ? "true" : "false", name.c_str());
}
switch (prop)
@ -786,7 +786,7 @@ void plPXPhysical::SendNewLocation(hsBool synchTransform, hsBool isSynchUpdate)
if (!CompareMatrices(curl2w, fCachedLocal2World, .0001f))
{
plProfile_Inc(LocationsSent);
plProfile_BeginLap(PhysicsUpdates, GetKeyName());
plProfile_BeginLap(PhysicsUpdates, GetKeyName().c_str());
// quick peek at the translation...last time it was corrupted because we applied a non-unit quaternion
// hsAssert(real_finite(fCachedLocal2World.fMap[0][3]) &&
@ -808,7 +808,7 @@ void plPXPhysical::SendNewLocation(hsBool synchTransform, hsBool isSynchUpdate)
pCorrMsg->Send();
if (fProxyGen)
fProxyGen->SetTransform(fCachedLocal2World, w2l);
plProfile_EndLap(PhysicsUpdates, GetKeyName());
plProfile_EndLap(PhysicsUpdates, GetKeyName().c_str());
}
}
}

View File

@ -208,7 +208,7 @@ class SensorReport : public NxUserTriggerReport
void SendCollisionMsg(plKey receiver, plKey hitter, hsBool entering)
{
DetectorLogYellow("Collision: %s was triggered by %s. Sending an %s msg", receiver->GetName(),
hitter ? hitter->GetName() : "(nil)" , entering ? "'enter'" : "'exit'");
hitter ? hitter->GetName().c_str() : "(nil)" , entering ? "'enter'" : "'exit'");
plCollideMsg* msg = TRACKED_NEW plCollideMsg;
msg->fOtherKey = hitter;
msg->fEntering = entering;
@ -537,8 +537,8 @@ void plSimulationMgr::ReleaseScene(plKey world)
void plSimulationMgr::ISendCollisionMsg(plKey receiver, plKey hitter, hsBool entering)
{
DetectorLogYellow("Collision: %s is inside %s. Sending an %s msg", hitter ? hitter->GetName() : "(nil)",
receiver->GetName(), entering ? "'enter'" : "'exit'");
DetectorLogYellow("Collision: %s is inside %s. Sending an %s msg", hitter ? hitter->GetName().c_str() : "(nil)",
receiver->GetName().c_str(), entering ? "'enter'" : "'exit'");
plCollideMsg* msg = TRACKED_NEW plCollideMsg;
msg->fOtherKey = hitter;
msg->fEntering = entering;
@ -740,10 +740,10 @@ void plSimulationMgr::ISendUpdates()
const plKey physKey = physical->GetKey();
if (physKey)
{
const char *physName = physical->GetKeyName();
if (physName)
const plString &physName = physical->GetKeyName();
if (!physName.IsNull())
{
plSimulationMgr::Log("Removing physical <%s> because of missing scene node.\n", physName);
plSimulationMgr::Log("Removing physical <%s> because of missing scene node.\n", physName.c_str());
}
}
// Remove(physical);