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

Fix several errors and warnings from GCC compilation

This commit is contained in:
2012-02-09 00:56:03 -08:00
parent e6ebf7ffaf
commit ad66286a17
78 changed files with 318 additions and 331 deletions

View File

@ -252,22 +252,22 @@ void plCameraRegionDetector::ITrigger(plKey hitter, bool entering, bool immediat
// PHYSX_FIXME hack for PhysX turd that sends bunches of enter/exits over one frame
if (entering && fNumEvals - fLastExitEval <= 1 && fSavingSendMsg)
{
DetectorLog("%s: Skipping Camera Entering volume", GetKeyName());
DetectorLog("%s: Skipping Camera Entering volume", GetKeyName().c_str());
fLastEnterEval = fNumEvals;
if (fSavingSendMsg)
{
DetectorLog("%s: Dumping saved Camera Exiting volume", GetKeyName());
DetectorLog("%s: Dumping saved Camera Exiting volume", GetKeyName().c_str());
}
fSavingSendMsg = false;
return;
}
if (!entering && fNumEvals - fLastEnterEval <= 1 && fSavingSendMsg)
{
DetectorLog("%s: Skipping Exiting volume", GetKeyName());
DetectorLog("%s: Skipping Exiting volume", GetKeyName().c_str());
fLastExitEval = fNumEvals;
if (fSavingSendMsg)
{
DetectorLog("%s: Dumping saved Camera Entering volume", GetKeyName());
DetectorLog("%s: Dumping saved Camera Entering volume", GetKeyName().c_str());
}
fSavingSendMsg = false;
return;
@ -276,7 +276,7 @@ void plCameraRegionDetector::ITrigger(plKey hitter, bool entering, bool immediat
// get rid of any saved messages... this should happen though
if (fSavingSendMsg)
{
DetectorLog("%s: Killing saved camera message... shouldn't happen", GetKeyName());
DetectorLog("%s: Killing saved camera message... shouldn't happen", GetKeyName().c_str());
}
// end PHYSX_FIXME hack for PhysX turd that sends bunches of enter/exits over one frame
#endif // USE_PHYSX_COLLISION_FLUTTER_WORKAROUND
@ -285,12 +285,12 @@ void plCameraRegionDetector::ITrigger(plKey hitter, bool entering, bool immediat
fSavedMsgEnterFlag = entering;
if (entering)
{
//DetectorLog("%s: Saving camera Entering volume - Evals=%d", GetKeyName(),fNumEvals);
//DetectorLog("%s: Saving camera Entering volume - Evals=%d", GetKeyName().c_str(),fNumEvals);
fLastEnterEval = fNumEvals;
}
else
{
//DetectorLog("%s: Saving camera Exiting volume - Evals=%d", GetKeyName(),fNumEvals);
//DetectorLog("%s: Saving camera Exiting volume - Evals=%d", GetKeyName().c_str(),fNumEvals);
fLastExitEval = fNumEvals;
}
@ -322,13 +322,13 @@ void plCameraRegionDetector::ISendSavedTriggerMsgs()
if (fSavedMsgEnterFlag)
{
fMessages[i]->SetCmd(plCameraMsg::kEntering);
sprintf(str, "Entering cameraRegion: %s - Evals=%d -msg %d of %d\n", GetKeyName(),fNumEvals,i+1,fMessages.Count());
sprintf(str, "Entering cameraRegion: %s - Evals=%d -msg %d of %d\n", GetKeyName().c_str(),fNumEvals,i+1,fMessages.Count());
fIsInside = true;
}
else
{
fMessages[i]->ClearCmd(plCameraMsg::kEntering);
sprintf(str, "Exiting cameraRegion: %s - Evals=%d -msg %d of %d\n", GetKeyName(),fNumEvals,i+1,fMessages.Count());
sprintf(str, "Exiting cameraRegion: %s - Evals=%d -msg %d of %d\n", GetKeyName().c_str(),fNumEvals,i+1,fMessages.Count());
fIsInside = false;
}
plgDispatch::MsgSend(fMessages[i]);
@ -401,8 +401,8 @@ void plCameraRegionDetector::IHandleEval(plEvalMsg *pEval)
{
if(fSavedActivatorMsg)
DetectorLog("%s didn't send its message. fNumEvals=%d fLastEnterEval=%d, fLastExit=%d",
GetKeyName(),fNumEvals, fLastEnterEval, fLastExitEval);
GetKeyName().c_str(),fNumEvals, fLastEnterEval, fLastExitEval);
}
}
@ -663,11 +663,11 @@ void plObjectInVolumeDetector::IHandleEval(plEvalMsg* pEval)
fCurrentResidents.insert((*it)->hitter);
actout->AddReceivers(fReceivers);
actout->Send();
DetectorLog("%s sent an Enter ActivatorMsg. To: %s", GetKeyName(), GetTarget()->GetKeyName() );
DetectorLog("%s sent an Enter ActivatorMsg. To: %s", GetKeyName().c_str(), GetTarget()->GetKeyName().c_str() );
}
else
{
DetectorLog("%s squelched an Enter ActivatorMsg.", GetKeyName());
DetectorLog("%s squelched an Enter ActivatorMsg.", GetKeyName().c_str());
delete actout;
}
}
@ -680,11 +680,11 @@ void plObjectInVolumeDetector::IHandleEval(plEvalMsg* pEval)
fCurrentResidents.erase((*it)->hitter);
actout->AddReceivers(fReceivers);
actout->Send();
DetectorLog("%s sent an Exit ActivatorMsg. To: %s", GetKeyName(), GetTarget()->GetKeyName());
DetectorLog("%s sent an Exit ActivatorMsg. To: %s", GetKeyName().c_str(), GetTarget()->GetKeyName().c_str());
}
else
{
DetectorLog("%s squelched an Exit ActivatorMsg.", GetKeyName());
DetectorLog("%s squelched an Exit ActivatorMsg.", GetKeyName().c_str());
delete actout;
}
}
@ -697,12 +697,12 @@ void plObjectInVolumeDetector::IHandleEval(plEvalMsg* pEval)
DetectorLog("This is the regions inhabitants after the op");
for(ResidentSet::iterator it = fCurrentResidents.begin(); it!= fCurrentResidents.end(); it++)
{
DetectorLog("%s", (*it)->GetName());
DetectorLog("%s", (*it)->GetName().c_str());
}
DetectorLog("*********");
fCollisionList.clear();
}
void plObjectInVolumeDetector::SetTarget(plSceneObject* so)
@ -778,13 +778,13 @@ void plObjectInVolumeAndFacingDetector::ICheckForTrigger()
if (facing && movingForward && !fTriggered)
{
DetectorLog("%s: Trigger InVolume&Facing", GetKeyName());
DetectorLog("%s: Trigger InVolume&Facing", GetKeyName().c_str());
fTriggered = true;
ITrigger(avatar->GetKey(), true, true);
}
else if (!facing && fTriggered)
{
DetectorLog("%s: Untrigger InVolume&Facing", GetKeyName());
DetectorLog("%s: Untrigger InVolume&Facing", GetKeyName().c_str());
fTriggered = false;
ITrigger(avatar->GetKey(), false, true);
}
@ -877,7 +877,7 @@ hsBool plSubworldRegionDetector::MsgReceive(plMessage* msg)
plArmatureMod* avMod = IGetAvatarModifier(pCollMsg->fOtherKey);
if (avMod)
{
DetectorLog("%s subworld detector %s", pCollMsg->fEntering ? "Entering" : "Exiting", GetKeyName());
DetectorLog("%s subworld detector %s", pCollMsg->fEntering ? "Entering" : "Exiting", GetKeyName().c_str());
if ((pCollMsg->fEntering && !fOnExit) ||
(!pCollMsg->fEntering && fOnExit))
@ -887,7 +887,7 @@ hsBool plSubworldRegionDetector::MsgReceive(plMessage* msg)
plSceneObject* SO = plSceneObject::ConvertNoRef(fSub->ObjectIsLoaded());
if (SO)
{
DetectorLogSpecial("Switching to subworld %s", fSub->GetName());
DetectorLogSpecial("Switching to subworld %s", fSub->GetName().c_str());
plKey nilKey;
plSubWorldMsg* msg = new plSubWorldMsg(GetKey(), avMod->GetKey(), fSub);

View File

@ -215,27 +215,27 @@ void plPhysicalSDLModifier::ILogState(const plStateDataRecord* state, bool useDi
plPhysical* phys = IGetPhysical();
std::string log = xtl::format("%s: %s", phys->GetKeyName(), prefix);
plString log = plString::Format("%s: %s", phys->GetKeyName().c_str(), prefix);
if (isPosSet)
log += xtl::format(" Pos=%.1f %.1f %.1f", pos.fX, pos.fY, pos.fZ);
log += plString::Format(" Pos=%.1f %.1f %.1f", pos.fX, pos.fY, pos.fZ);
else
log += " Pos=None";
log += _TEMP_CONVERT_FROM_LITERAL(" Pos=None");
if (isLinVSet)
log += xtl::format(" LinV=%.1f %.1f %.1f", linV.fX, linV.fY, linV.fZ);
log += plString::Format(" LinV=%.1f %.1f %.1f", linV.fX, linV.fY, linV.fZ);
else
log += " LinV=None";
log += _TEMP_CONVERT_FROM_LITERAL(" LinV=None");
if (isAngVSet)
log += xtl::format(" AngV=%.1f %.1f %.1f", angV.fX, angV.fY, angV.fZ);
log += plString::Format(" AngV=%.1f %.1f %.1f", angV.fX, angV.fY, angV.fZ);
else
log += " AngV=None";
log += _TEMP_CONVERT_FROM_LITERAL(" AngV=None");
if (isRotSet)
log += xtl::format(" Rot=%.1f %.1f %.1f %.1f", rot.fX, rot.fY, rot.fZ, rot.fW);
log += plString::Format(" Rot=%.1f %.1f %.1f %.1f", rot.fX, rot.fY, rot.fZ, rot.fW);
else
log += " Rot=None";
log += _TEMP_CONVERT_FROM_LITERAL(" Rot=None");
IGetLog()->AddLine(log.c_str(), color);
}

View File

@ -91,7 +91,7 @@ hsBool plPickingDetector::MsgReceive(plMessage* msg)
pMsg->fPickedObj = fProxyKey;
else
pMsg->fPickedObj = GetTarget()->GetKey();
// assume that since this is something that was PICKED that it was done by the local player.
plKey locPlayerKey = plNetClientApp::GetInstance()->GetLocalPlayerKey();
if (locPlayerKey)
@ -99,10 +99,10 @@ hsBool plPickingDetector::MsgReceive(plMessage* msg)
pMsg->SetSender(GetKey());
plgDispatch::MsgSend( pMsg );
hsStatusMessageF("%s sending activate message to %s\n",GetKey()->GetName(), fReceivers[i]->GetName());
hsStatusMessageF("%s sending activate message to %s\n",GetKey()->GetName().c_str(), fReceivers[i]->GetName().c_str());
}
}
if (RemoteMod() && RemoteMod()->MsgReceive(msg))
return true;