mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Get rid of NEW(), TRACKED_NEW, and ZERO().
This commit is contained in:
@ -290,7 +290,7 @@ plMessage* plLOSDispatch::ICreateHitMsg(plLOSRequestMsg* requestMsg, hsMatrix44&
|
||||
{
|
||||
plKey ourKey = GetKey();
|
||||
plKey rcvKey = requestMsg->GetSender();
|
||||
plLOSHitMsg* hitMsg = TRACKED_NEW plLOSHitMsg(ourKey, rcvKey, nil);
|
||||
plLOSHitMsg* hitMsg = new plLOSHitMsg(ourKey, rcvKey, nil);
|
||||
hitMsg->fNoHit = false;
|
||||
hitMsg->fObj = gMyReport.GetObj();
|
||||
hitMsg->fDistance = gMyReport.GetDistance();
|
||||
@ -304,7 +304,7 @@ plMessage* plLOSDispatch::ICreateMissMsg(plLOSRequestMsg* requestMsg)
|
||||
{
|
||||
plKey ourKey = GetKey();
|
||||
plKey rcvKey = requestMsg->GetSender();
|
||||
plLOSHitMsg* missMsg = TRACKED_NEW plLOSHitMsg(ourKey, rcvKey, nil);
|
||||
plLOSHitMsg* missMsg = new plLOSHitMsg(ourKey, rcvKey, nil);
|
||||
missMsg->fNoHit = true;
|
||||
missMsg->fObj = nil;
|
||||
missMsg->fRequestID = requestMsg->GetRequestID();
|
||||
|
@ -265,7 +265,7 @@ void plPXPhysical::IMakeHull(NxConvexMesh* convexMesh, hsMatrix44 l2w)
|
||||
delete [] fSaveTriangles;
|
||||
|
||||
fHullNumberPlanes = desc.numTriangles;
|
||||
fSaveTriangles = TRACKED_NEW hsPoint3[fHullNumberPlanes*3];
|
||||
fSaveTriangles = new hsPoint3[fHullNumberPlanes*3];
|
||||
|
||||
for (int i = 0; i < desc.numTriangles; i++)
|
||||
{
|
||||
@ -288,7 +288,7 @@ void plPXPhysical::ISetHullToWorldWTriangles()
|
||||
// if we have a detector hull and the world hasn't been updated
|
||||
if (fWorldHull == nil)
|
||||
{
|
||||
fWorldHull = TRACKED_NEW hsPlane3[fHullNumberPlanes];
|
||||
fWorldHull = new hsPlane3[fHullNumberPlanes];
|
||||
// use the local2world from the physics engine so that it matches the transform of the positions from the triggerees
|
||||
hsMatrix44 l2w;
|
||||
plPXConvert::Matrix(fActor->getGlobalPose(), l2w);
|
||||
@ -546,12 +546,12 @@ hsBool plPXPhysical::Init(PhysRecipe& recipe)
|
||||
if (GetProperty(plSimulationInterface::kSuppressed_DEAD))
|
||||
IEnable(false);
|
||||
|
||||
plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(fSceneNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kPhysical);
|
||||
plNodeRefMsg* refMsg = new plNodeRefMsg(fSceneNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kPhysical);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kActiveRef);
|
||||
|
||||
if (fWorldKey)
|
||||
{
|
||||
plGenRefMsg* ref = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPhysRefWorld);
|
||||
plGenRefMsg* ref = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPhysRefWorld);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(fWorldKey, ref, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
@ -563,7 +563,7 @@ hsBool plPXPhysical::Init(PhysRecipe& recipe)
|
||||
hsAssert(sceneObj, "nil sceneObject, failed to create and attach SDL modifier");
|
||||
|
||||
delete fSDLMod;
|
||||
fSDLMod = TRACKED_NEW plPhysicalSDLModifier;
|
||||
fSDLMod = new plPhysicalSDLModifier;
|
||||
sceneObj->AddModifier(fSDLMod);
|
||||
}
|
||||
|
||||
@ -804,7 +804,7 @@ void plPXPhysical::SendNewLocation(hsBool synchTransform, hsBool isSynchUpdate)
|
||||
|
||||
hsMatrix44 w2l;
|
||||
fCachedLocal2World.GetInverse(&w2l);
|
||||
plCorrectionMsg *pCorrMsg = TRACKED_NEW plCorrectionMsg(GetObjectKey(), fCachedLocal2World, w2l, synchTransform);
|
||||
plCorrectionMsg *pCorrMsg = new plCorrectionMsg(GetObjectKey(), fCachedLocal2World, w2l, synchTransform);
|
||||
pCorrMsg->Send();
|
||||
if (fProxyGen)
|
||||
fProxyGen->SetTransform(fCachedLocal2World, w2l);
|
||||
@ -1035,7 +1035,7 @@ void plPXPhysical::Read(hsStream* stream, hsResMgr* mgr)
|
||||
recipe.sceneNode = mgr->ReadKey(stream);
|
||||
recipe.worldKey = mgr->ReadKey(stream);
|
||||
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPhysRefSndGroup), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPhysRefSndGroup), plRefFlags::kActiveRef);
|
||||
|
||||
hsPoint3 pos;
|
||||
hsQuat rot;
|
||||
@ -1117,7 +1117,7 @@ void plPXPhysical::Read(hsStream* stream, hsResMgr* mgr)
|
||||
physColor.Set(0.6f,0.6f,0.6f,1.f);
|
||||
}
|
||||
|
||||
fProxyGen = TRACKED_NEW plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac);
|
||||
fProxyGen = new plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac);
|
||||
fProxyGen->Init(this);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ plPhysicalController* plPhysicalController::Create(plKey ownerSO, hsScalar heigh
|
||||
hsScalar radius = width / 2.f;
|
||||
//hsScalar realHeight = height - width;
|
||||
hsScalar realHeight = height - radius + kPhysicalHeightFudge;
|
||||
return TRACKED_NEW plPXPhysicalController(ownerSO, radius, realHeight);
|
||||
return new plPXPhysicalController(ownerSO, radius, realHeight);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -247,7 +247,7 @@ void plPXPhysicalController::IInformDetectors(bool entering)
|
||||
plPXPhysical* physical = (plPXPhysical*)myactor->userData;
|
||||
if (physical)
|
||||
{
|
||||
plCollideMsg* msg = TRACKED_NEW plCollideMsg;
|
||||
plCollideMsg* msg = new plCollideMsg;
|
||||
|
||||
msg->fOtherKey = fOwner;
|
||||
msg->fEntering = entering;
|
||||
@ -321,7 +321,7 @@ public:
|
||||
obj->SetNetGroupConstant(plNetGroup::kNetGroupLocalPhysicals);
|
||||
|
||||
// Tell all the other clients that we own this physical
|
||||
plSetNetGroupIDMsg* setNetGroupID = TRACKED_NEW plSetNetGroupIDMsg;
|
||||
plSetNetGroupIDMsg* setNetGroupID = new plSetNetGroupIDMsg;
|
||||
setNetGroupID->fId = plNetGroup::kNetGroupRemotePhysicals;
|
||||
setNetGroupID->SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce);
|
||||
setNetGroupID->SetBCastFlag(plMessage::kLocalPropagate, false);
|
||||
@ -1039,7 +1039,7 @@ void plPXPhysicalController::ISendUpdates(hsScalar delSecs)
|
||||
fLastGlobalLoc = l2w * fLastGlobalLoc;
|
||||
}
|
||||
|
||||
plCorrectionMsg* corrMsg = TRACKED_NEW plCorrectionMsg;
|
||||
plCorrectionMsg* corrMsg = new plCorrectionMsg;
|
||||
corrMsg->fLocalToWorld = fLastGlobalLoc;
|
||||
corrMsg->fLocalToWorld.GetInverse(&corrMsg->fWorldToLocal);
|
||||
corrMsg->fDirtySynch = true;
|
||||
@ -1197,7 +1197,7 @@ void plPXPhysicalController::ICreateController()
|
||||
opac = 0.8f;
|
||||
|
||||
// the avatar proxy doesn't seem to work... not sure why?
|
||||
fProxyGen = TRACKED_NEW plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac);
|
||||
fProxyGen = new plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac);
|
||||
fProxyGen->Init(this);
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ public:
|
||||
plSynchedObject* obj = plSynchedObject::ConvertNoRef(phys->GetObjectKey()->ObjectIsLoaded());
|
||||
obj->SetNetGroupConstant(plNetGroup::kNetGroupLocalPhysicals);
|
||||
// Tell all the other clients that we own this physical
|
||||
plSetNetGroupIDMsg* setNetGroupID = TRACKED_NEW plSetNetGroupIDMsg;
|
||||
plSetNetGroupIDMsg* setNetGroupID = new plSetNetGroupIDMsg;
|
||||
setNetGroupID->fId = plNetGroup::kNetGroupRemotePhysicals;
|
||||
setNetGroupID->SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce);
|
||||
setNetGroupID->SetBCastFlag(plMessage::kLocalPropagate, false);
|
||||
@ -230,7 +230,7 @@ plPhysicalControllerCore* plPhysicalControllerCore::Create(plKey ownerSO, float
|
||||
{
|
||||
float radius = width / 2.f;
|
||||
float realHeight = height - width + kPhysicalHeightFudge;
|
||||
return TRACKED_NEW plPXPhysicalControllerCore(ownerSO, realHeight,radius);
|
||||
return new plPXPhysicalControllerCore(ownerSO, realHeight,radius);
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
@ -576,7 +576,7 @@ NxScene* scene = plSimulationMgr::GetInstance()->GetScene(fWorldKey);
|
||||
|
||||
/*
|
||||
// the avatar proxy doesn't seem to work... not sure why?
|
||||
fProxyGen = TRACKED_NEW plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac);
|
||||
fProxyGen = new plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac);
|
||||
fProxyGen->Init(this);
|
||||
*/
|
||||
}
|
||||
@ -646,7 +646,7 @@ void plPXPhysicalControllerCore::ICreateController(const hsPoint3& pos)
|
||||
|
||||
/*
|
||||
// the avatar proxy doesn't seem to work... not sure why?
|
||||
fProxyGen = TRACKED_NEW plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac);
|
||||
fProxyGen = new plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac);
|
||||
fProxyGen->Init(this);
|
||||
*/
|
||||
|
||||
@ -694,7 +694,7 @@ void plPXPhysicalControllerCore::IInformDetectors(bool entering,bool deferUntilN
|
||||
bool doReport = physical->DoReportOn(plSimDefs::kGroupAvatar);
|
||||
if(doReport)
|
||||
{
|
||||
plCollideMsg* msg = TRACKED_NEW plCollideMsg;
|
||||
plCollideMsg* msg = new plCollideMsg;
|
||||
msg->fOtherKey = fOwner;
|
||||
msg->fEntering = entering;
|
||||
msg->AddReceiver(physical->GetObjectKey());
|
||||
@ -990,7 +990,7 @@ void plPXPhysicalControllerCore::IHandleResize()
|
||||
collideFlags|=(1<<plSimDefs::kGroupExcludeRegion);
|
||||
}
|
||||
NxScene* myscene = plSimulationMgr::GetInstance()->GetScene(this->fWorldKey);
|
||||
// NxShape** response=TRACKED_NEW NxShape*[2];
|
||||
// NxShape** response=new NxShape*[2];
|
||||
|
||||
NxVec3 center(fLocalPosition.fX,fLocalPosition.fY,fLocalPosition.fZ+fPreferedRadius);
|
||||
NxSegment Seg(center,center);
|
||||
|
@ -209,7 +209,7 @@ class SensorReport : public NxUserTriggerReport
|
||||
{
|
||||
DetectorLogYellow("Collision: %s was triggered by %s. Sending an %s msg", receiver->GetName(),
|
||||
hitter ? hitter->GetName() : "(nil)" , entering ? "'enter'" : "'exit'");
|
||||
plCollideMsg* msg = TRACKED_NEW plCollideMsg;
|
||||
plCollideMsg* msg = new plCollideMsg;
|
||||
msg->fOtherKey = hitter;
|
||||
msg->fEntering = entering;
|
||||
msg->AddReceiver(receiver);
|
||||
@ -370,7 +370,7 @@ bool plSimulationMgr::fDoClampingOnStep=true;
|
||||
void plSimulationMgr::Init()
|
||||
{
|
||||
hsAssert(!gTheInstance, "Initializing the sim when it's already been done");
|
||||
gTheInstance = TRACKED_NEW plSimulationMgr();
|
||||
gTheInstance = new plSimulationMgr();
|
||||
if (gTheInstance->InitSimulation())
|
||||
{
|
||||
gTheInstance->RegisterAs(kSimulationMgr_KEY);
|
||||
@ -410,7 +410,7 @@ plSimulationMgr::plSimulationMgr()
|
||||
: fSuspended(true)
|
||||
, fMaxDelta(kDefaultMaxDelta)
|
||||
, fStepSize(kDefaultStepSize)
|
||||
, fLOSDispatch(TRACKED_NEW plLOSDispatch())
|
||||
, fLOSDispatch(new plLOSDispatch())
|
||||
, fSoundMgr(new plPhysicsSoundMgr)
|
||||
, fLog(nil)
|
||||
{
|
||||
@ -539,7 +539,7 @@ void plSimulationMgr::ISendCollisionMsg(plKey receiver, plKey hitter, hsBool ent
|
||||
{
|
||||
DetectorLogYellow("Collision: %s is inside %s. Sending an %s msg", hitter ? hitter->GetName() : "(nil)",
|
||||
receiver->GetName(), entering ? "'enter'" : "'exit'");
|
||||
plCollideMsg* msg = TRACKED_NEW plCollideMsg;
|
||||
plCollideMsg* msg = new plCollideMsg;
|
||||
msg->fOtherKey = hitter;
|
||||
msg->fEntering = entering;
|
||||
msg->AddReceiver(receiver);
|
||||
|
Reference in New Issue
Block a user