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:
@ -88,7 +88,7 @@ plAGAnim::plAGAnim(const char *name, double start, double end)
|
||||
if (name == nil)
|
||||
name = "";
|
||||
|
||||
fName = TRACKED_NEW char[strlen(name) + 1];
|
||||
fName = new char[strlen(name) + 1];
|
||||
strcpy(fName, name);
|
||||
}
|
||||
|
||||
|
@ -108,13 +108,13 @@ plAGAnimInstance::plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master,
|
||||
plATCAnim *atcAnim = plATCAnim::ConvertNoRef(anim);
|
||||
if (atcAnim)
|
||||
{
|
||||
fTimeConvert = TRACKED_NEW plAnimTimeConvert();
|
||||
fTimeConvert = new plAnimTimeConvert();
|
||||
fTimeConvert->Init(atcAnim, this, master);
|
||||
timeChan = TRACKED_NEW plATCChannel(fTimeConvert);
|
||||
timeChan = new plATCChannel(fTimeConvert);
|
||||
}
|
||||
else
|
||||
{
|
||||
timeChan = TRACKED_NEW plScalarSDLChannel(anim->GetLength());
|
||||
timeChan = new plScalarSDLChannel(anim->GetLength());
|
||||
fSDLChannels.push_back((plScalarSDLChannel *)timeChan);
|
||||
}
|
||||
|
||||
@ -404,7 +404,7 @@ void plAGAnimInstance::AttachCallbacks(plOneShotCallbacks *callbacks)
|
||||
{
|
||||
plOneShotCallbacks::plOneShotCallback& cb = callbacks->GetCallback(i);
|
||||
|
||||
plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg;
|
||||
plEventCallbackMsg *eventMsg = new plEventCallbackMsg;
|
||||
eventMsg->AddReceiver(cb.fReceiver);
|
||||
eventMsg->fRepeats = 0;
|
||||
eventMsg->fUser = cb.fUser;
|
||||
@ -567,7 +567,7 @@ static agAllocMap gAGAllocs;
|
||||
|
||||
void RegisterAGAlloc(plAGChannel *object, const char *chanName, const char *animName, uint16_t classIndex)
|
||||
{
|
||||
gAGAllocs[object] = TRACKED_NEW agAlloc(object, chanName, animName, classIndex);
|
||||
gAGAllocs[object] = new agAlloc(object, chanName, animName, classIndex);
|
||||
}
|
||||
|
||||
void DumpAGAllocs()
|
||||
|
@ -112,7 +112,7 @@ void plAGMasterMod::Read(hsStream * stream, hsResMgr *mgr)
|
||||
|
||||
//////////////////////////////////////////
|
||||
int nameLength = stream->ReadLE32(); // Unused. Nuke next format change.
|
||||
char *junk = TRACKED_NEW char[nameLength+1]; //
|
||||
char *junk = new char[nameLength+1]; //
|
||||
stream->Read(nameLength, junk); //
|
||||
junk[nameLength] = 0; //
|
||||
delete [] junk; //
|
||||
@ -123,14 +123,14 @@ void plAGMasterMod::Read(hsStream * stream, hsResMgr *mgr)
|
||||
int i;
|
||||
for (i = 0; i < numPrivateAnims; i++)
|
||||
{
|
||||
plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPrivateAnim);
|
||||
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPrivateAnim);
|
||||
mgr->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef);
|
||||
}
|
||||
fIsGrouped = stream->Readbool();
|
||||
fIsGroupMaster = stream->Readbool();
|
||||
if (fIsGroupMaster)
|
||||
{
|
||||
plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0);
|
||||
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0);
|
||||
mgr->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ void plAGMasterMod::AddTarget(plSceneObject * object)
|
||||
{
|
||||
// add sdl modifier
|
||||
delete fAGMasterSDLMod;
|
||||
fAGMasterSDLMod = TRACKED_NEW plAGMasterSDLModifier;
|
||||
fAGMasterSDLMod = new plAGMasterSDLModifier;
|
||||
object->AddModifier(fAGMasterSDLMod);
|
||||
}
|
||||
}
|
||||
@ -347,7 +347,7 @@ plAGModifier * plAGMasterMod::GetChannelMod(const char * name, hsBool dontCache
|
||||
// CACHECHANNELMOD
|
||||
plAGModifier * plAGMasterMod::ICacheChannelMod(plAGModifier *mod) const
|
||||
{
|
||||
plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0);
|
||||
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0);
|
||||
hsgResMgr::ResMgr()->SendRef(mod, msg, plRefFlags::kActiveRef);
|
||||
|
||||
return mod;
|
||||
@ -403,10 +403,10 @@ plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(plAGAnim *anim,
|
||||
}
|
||||
if (i == fPrivateAnims.end()) // Didn't find it. Ref it!
|
||||
{
|
||||
plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPublicAnim);
|
||||
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPublicAnim);
|
||||
hsgResMgr::ResMgr()->SendRef(anim, msg, plRefFlags::kActiveRef);
|
||||
}
|
||||
instance = TRACKED_NEW plAGAnimInstance(anim, this, blendFactor, blendPriority, cache, false);
|
||||
instance = new plAGAnimInstance(anim, this, blendFactor, blendPriority, cache, false);
|
||||
fAnimInstances.push_back(instance);
|
||||
|
||||
plATCAnim *atcAnim = plATCAnim::ConvertNoRef(anim);
|
||||
@ -450,7 +450,7 @@ void plAGMasterMod::PlaySimpleAnim(const char *name)
|
||||
instance->SetLoop(false);
|
||||
instance->Start();
|
||||
|
||||
plAGDetachCallbackMsg *msg = TRACKED_NEW plAGDetachCallbackMsg(GetKey(), kStop);
|
||||
plAGDetachCallbackMsg *msg = new plAGDetachCallbackMsg(GetKey(), kStop);
|
||||
msg->SetAnimName(name);
|
||||
instance->GetTimeConvert()->AddCallback(msg);
|
||||
hsRefCnt_SafeUnRef(msg);
|
||||
|
@ -193,7 +193,7 @@ void plAGMasterSDLModifier::ISetCurrentStateFrom(const plStateDataRecord* srcSta
|
||||
{
|
||||
float animTimeFromWorldTime = (objAGMaster->GetNumATCAnimations() > 0) ? objAGMaster->GetATCAnimInstance(0)->GetTimeConvert()->WorldToAnimTimeNoUpdate(time) : 0.0f;
|
||||
|
||||
plAGCmdMsg *msg = TRACKED_NEW plAGCmdMsg();
|
||||
plAGCmdMsg *msg = new plAGCmdMsg();
|
||||
msg->SetCmd(plAGCmdMsg::kSetAnimTime);
|
||||
msg->fAnimTime = animTimeFromWorldTime;
|
||||
msg->AddReceiver(objAGMaster->fMsgForwarder->GetKey());
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
channels attached to it that were intended for "Lamont." */
|
||||
void SetChannelName(char * name);
|
||||
|
||||
/** Attach a TRACKED_NEW applicator to our modifier. Will arbitrate with existing
|
||||
/** Attach a new applicator to our modifier. Will arbitrate with existing
|
||||
modifiers if necessary, based on pin type. May destruct existing applicators. */
|
||||
plAGChannel *MergeChannel(plAGApplicator *app, plAGChannel *chan, plScalarChannel *blend,
|
||||
plAGAnimInstance *anim, int priority);
|
||||
|
@ -296,7 +296,7 @@ hsBool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArma
|
||||
plKey avKey = armature->GetTarget(0)->GetKey();
|
||||
if (fMod)
|
||||
avKey = fMod->GetKey();
|
||||
plNotifyMsg *msg = TRACKED_NEW plNotifyMsg();
|
||||
plNotifyMsg *msg = new plNotifyMsg();
|
||||
msg->SetSender(avKey);
|
||||
|
||||
if (fMod)
|
||||
|
@ -86,7 +86,7 @@ void plArmatureEffectsMgr::Read(hsStream *s, hsResMgr *mgr)
|
||||
int numEffects = s->ReadLE32();
|
||||
while (numEffects > 0)
|
||||
{
|
||||
plRefMsg *msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
plRefMsg *msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
hsgResMgr::ResMgr()->ReadKeyNotifyMe(s, msg, plRefFlags::kActiveRef);
|
||||
numEffects--;
|
||||
}
|
||||
@ -182,7 +182,7 @@ void plArmatureEffectsMgr::ResetEffects()
|
||||
|
||||
plArmatureEffectFootSound::plArmatureEffectFootSound()
|
||||
{
|
||||
plArmatureEffectFootSurface *surface = TRACKED_NEW plArmatureEffectFootSurface;
|
||||
plArmatureEffectFootSurface *surface = new plArmatureEffectFootSurface;
|
||||
surface->fID = plArmatureEffectsMgr::kFootNoSurface;
|
||||
surface->fTrigger = nil;
|
||||
fSurfaces.Append(surface);
|
||||
@ -209,7 +209,7 @@ void plArmatureEffectFootSound::Read(hsStream* s, hsResMgr* mgr)
|
||||
int i;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1);
|
||||
plGenRefMsg *msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1);
|
||||
mgr->ReadKeyNotifyMe(s, msg, plRefFlags::kActiveRef);
|
||||
}
|
||||
}
|
||||
@ -272,7 +272,7 @@ hsBool plArmatureEffectFootSound::HandleTrigger(plMessage* msg)
|
||||
if (plgAudioSys::Active() && fActiveSurfaces.IsBitSet(curSurfaceIndex))
|
||||
{
|
||||
fMods[curSurfaceIndex]->SetCurrentGroup(eMsg->fTriggerIdx);
|
||||
plAnimCmdMsg *animMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg *animMsg = new plAnimCmdMsg;
|
||||
animMsg->AddReceiver(fMods[curSurfaceIndex]->GetKey());
|
||||
animMsg->SetCmd(plAnimCmdMsg::kContinue);
|
||||
plgDispatch::MsgSend(animMsg);
|
||||
@ -294,7 +294,7 @@ hsBool plArmatureEffectFootSound::HandleTrigger(plMessage* msg)
|
||||
{
|
||||
plStatusLog::AddLineS("audio.log", "FTSP: Switching to surface - %s",
|
||||
plArmatureEffectsMgr::SurfaceStrings[sMsg->fSurface]);
|
||||
plArmatureEffectFootSurface *surface = TRACKED_NEW plArmatureEffectFootSurface;
|
||||
plArmatureEffectFootSurface *surface = new plArmatureEffectFootSurface;
|
||||
surface->fID = sMsg->fSurface;
|
||||
surface->fTrigger = sMsg->GetSender();
|
||||
fSurfaces.Append(surface);
|
||||
|
@ -220,7 +220,7 @@ void plArmatureModBase::Read(hsStream * stream, hsResMgr *mgr)
|
||||
plKey meshKey = mgr->ReadKey(stream);
|
||||
fMeshKeys.push_back(meshKey);
|
||||
|
||||
plKeyVector *vec = TRACKED_NEW plKeyVector;
|
||||
plKeyVector *vec = new plKeyVector;
|
||||
int boneCount = stream->ReadLE32();
|
||||
for(int j = 0; j < boneCount; j++)
|
||||
vec->push_back(mgr->ReadKey(stream));
|
||||
@ -276,7 +276,7 @@ void plArmatureModBase::EnableDrawingTree(const plSceneObject *object, hsBool st
|
||||
if (!object)
|
||||
return;
|
||||
|
||||
plEnableMsg *msg = TRACKED_NEW plEnableMsg;
|
||||
plEnableMsg *msg = new plEnableMsg;
|
||||
if (status)
|
||||
msg->SetCmd( plEnableMsg::kEnable );
|
||||
else
|
||||
@ -604,7 +604,7 @@ void plArmatureModBase::ICustomizeApplicator()
|
||||
}
|
||||
}
|
||||
plAGModifier *volAGMod = const_cast<plAGModifier *>(agMod);
|
||||
plMatrixDifferenceApp *differ = TRACKED_NEW plMatrixDifferenceApp();
|
||||
plMatrixDifferenceApp *differ = new plMatrixDifferenceApp();
|
||||
|
||||
fRootAnimator = differ;
|
||||
volAGMod->SetApplicator(differ);
|
||||
@ -769,7 +769,7 @@ const plSceneObject *plArmatureMod::FindBone(uint32_t id) const
|
||||
void plArmatureMod::AddBoneMapping(uint32_t id, const plSceneObject *bone)
|
||||
{
|
||||
if(!fBoneMap)
|
||||
fBoneMap = TRACKED_NEW plAvBoneMap();
|
||||
fBoneMap = new plAvBoneMap();
|
||||
|
||||
fBoneMap->AddBoneMapping(id, bone);
|
||||
}
|
||||
@ -888,7 +888,7 @@ void plArmatureMod::SpawnAt(int spawnNum, double time)
|
||||
}
|
||||
fWaitFlags &= ~kNeedSpawn;
|
||||
|
||||
plAvatarSpawnNotifyMsg *notify = TRACKED_NEW plAvatarSpawnNotifyMsg();
|
||||
plAvatarSpawnNotifyMsg *notify = new plAvatarSpawnNotifyMsg();
|
||||
notify->SetTimeStamp(hsTimer::GetSysSeconds() + 0.1);
|
||||
notify->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
notify->Send();
|
||||
@ -901,10 +901,10 @@ void plArmatureMod::SetFollowerParticleSystemSO(plSceneObject *follower)
|
||||
// TODO: Check for old one and clean up.
|
||||
hsPoint3 trans = GetTarget(0)->GetLocalToWorld().GetTranslate() - follower->GetLocalToWorld().GetTranslate();
|
||||
|
||||
plWarpMsg *warp = TRACKED_NEW plWarpMsg(GetKey(), follower->GetKey(), plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity,
|
||||
plWarpMsg *warp = new plWarpMsg(GetKey(), follower->GetKey(), plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity,
|
||||
GetTarget(0)->GetLocalToWorld());
|
||||
warp->Send();
|
||||
hsgResMgr::ResMgr()->AddViaNotify(follower->GetKey(), TRACKED_NEW plAttachMsg(GetTarget(0)->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(follower->GetKey(), new plAttachMsg(GetTarget(0)->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef);
|
||||
fFollowerParticleSystemSO = follower;
|
||||
|
||||
plParticleSystem *sys = const_cast<plParticleSystem*>(plParticleSystem::ConvertNoRef(follower->GetModifierByType(plParticleSystem::Index())));
|
||||
@ -936,7 +936,7 @@ void plArmatureMod::IFireBehaviorNotify(uint32_t type, hsBool behaviorStart)
|
||||
{
|
||||
if (fNotifyKeys.GetCount() > 0)
|
||||
{
|
||||
plAvatarBehaviorNotifyMsg *msg = TRACKED_NEW plAvatarBehaviorNotifyMsg();
|
||||
plAvatarBehaviorNotifyMsg *msg = new plAvatarBehaviorNotifyMsg();
|
||||
msg->SetSender(GetKey());
|
||||
msg->AddReceivers(fNotifyKeys);
|
||||
msg->fType = type;
|
||||
@ -963,7 +963,7 @@ void plArmatureMod::EnterAge(hsBool reSpawn)
|
||||
if (sys)
|
||||
{
|
||||
// Need to tell other clients about this
|
||||
plLoadCloneMsg *clone = TRACKED_NEW plLoadCloneMsg(GetFollowerParticleSystemSO()->GetKey(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID(), true);
|
||||
plLoadCloneMsg *clone = new plLoadCloneMsg(GetFollowerParticleSystemSO()->GetKey(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID(), true);
|
||||
clone->SetBCastFlag(plMessage::kLocalPropagate, false);
|
||||
clone->Send();
|
||||
|
||||
@ -998,7 +998,7 @@ void plArmatureMod::LeaveAge()
|
||||
if (GetFollowerParticleSystemSO())
|
||||
{
|
||||
// Need to tell other clients to remove this
|
||||
plLoadCloneMsg *clone = TRACKED_NEW plLoadCloneMsg(GetFollowerParticleSystemSO()->GetKey(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID(), false);
|
||||
plLoadCloneMsg *clone = new plLoadCloneMsg(GetFollowerParticleSystemSO()->GetKey(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID(), false);
|
||||
clone->SetBCastFlag(plMessage::kLocalPropagate, false);
|
||||
clone->Send();
|
||||
}
|
||||
@ -1024,7 +1024,7 @@ void plArmatureMod::PanicLink(hsBool playLinkOutAnim /* = true */)
|
||||
plNetApp::StaticDebugMsg("plArmatureMod::PanicLink()");
|
||||
|
||||
// make the player book blink as they are linking out
|
||||
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kStartBookAlert );
|
||||
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kStartBookAlert );
|
||||
plgDispatch::MsgSend( msg );
|
||||
|
||||
// Can't depend on the anim to link if the human brain isn't ready to deal with it
|
||||
@ -1035,13 +1035,13 @@ void plArmatureMod::PanicLink(hsBool playLinkOutAnim /* = true */)
|
||||
|
||||
if (playLinkOutAnim)
|
||||
{
|
||||
plAvOneShotLinkTask *task = TRACKED_NEW plAvOneShotLinkTask;
|
||||
plAvOneShotLinkTask *task = new plAvOneShotLinkTask;
|
||||
|
||||
char *animName = MakeAnimationName("FallingLinkOut");
|
||||
task->SetAnimName(animName);
|
||||
task->SetMarkerName("touch");
|
||||
|
||||
plAvTaskMsg *taskMsg = TRACKED_NEW plAvTaskMsg(GetKey(), GetKey(), task);
|
||||
plAvTaskMsg *taskMsg = new plAvTaskMsg(GetKey(), GetKey(), task);
|
||||
taskMsg->Send();
|
||||
|
||||
delete [] animName;
|
||||
@ -1061,13 +1061,13 @@ void plArmatureMod::PersonalLink()
|
||||
ILinkToPersonalAge();
|
||||
else
|
||||
{
|
||||
plAvOneShotLinkTask *task = TRACKED_NEW plAvOneShotLinkTask;
|
||||
plAvOneShotLinkTask *task = new plAvOneShotLinkTask;
|
||||
char *animName = MakeAnimationName("PersonalLink");
|
||||
task->SetAnimName(animName);
|
||||
task->SetMarkerName("touch");
|
||||
delete [] animName;
|
||||
|
||||
plAvTaskMsg *taskMsg = TRACKED_NEW plAvTaskMsg(GetKey(), GetKey(), task);
|
||||
plAvTaskMsg *taskMsg = new plAvTaskMsg(GetKey(), GetKey(), task);
|
||||
taskMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
taskMsg->Send();
|
||||
}
|
||||
@ -1253,7 +1253,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
|
||||
return true; // Only the local player can create the clone.
|
||||
|
||||
// Clone is sent to all players.
|
||||
plLoadCloneMsg *cloneMsg = TRACKED_NEW plLoadCloneMsg(partMsg->fSysSOKey->GetUoid(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID());
|
||||
plLoadCloneMsg *cloneMsg = new plLoadCloneMsg(partMsg->fSysSOKey->GetUoid(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID());
|
||||
cloneMsg->SetTriggerMsg(partMsg);
|
||||
cloneMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
cloneMsg->Send();
|
||||
@ -1302,7 +1302,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
|
||||
if(spawnSO)
|
||||
{
|
||||
hsMatrix44 l2w = spawnSO->GetLocalToWorld();
|
||||
plWarpMsg *warpM = TRACKED_NEW plWarpMsg(nil, GetTarget(0)->GetKey(), plWarpMsg::kFlushTransform, l2w);
|
||||
plWarpMsg *warpM = new plWarpMsg(nil, GetTarget(0)->GetKey(), plWarpMsg::kFlushTransform, l2w);
|
||||
warpM->Send();
|
||||
fWaitFlags &= ~kNeedSpawn;
|
||||
}
|
||||
@ -1508,7 +1508,7 @@ void plArmatureMod::SynchInputState(uint32_t rcvID /* = kInvalidPlayerID */)
|
||||
if (plAvatarMgr::GetInstance()->GetLocalAvatar() != this)
|
||||
return;
|
||||
|
||||
plAvatarInputStateMsg *msg = TRACKED_NEW plAvatarInputStateMsg();
|
||||
plAvatarInputStateMsg *msg = new plAvatarInputStateMsg();
|
||||
int i;
|
||||
uint32_t curBit;
|
||||
for (i = 0, curBit = 0x1; i < plAvatarInputStateMsg::fMapSize; i++, curBit <<= 1)
|
||||
@ -1542,7 +1542,7 @@ void plArmatureMod::ILinkToPersonalAge()
|
||||
link.SetSpawnPoint(hutSpawnPoint);
|
||||
|
||||
link.SetLinkingRules( plNetCommon::LinkingRules::kOriginalBook );
|
||||
plLinkToAgeMsg* pMsg = TRACKED_NEW plLinkToAgeMsg( &link );
|
||||
plLinkToAgeMsg* pMsg = new plLinkToAgeMsg( &link );
|
||||
pMsg->SetLinkInAnimName("PersonalBookEnter");
|
||||
pMsg->AddReceiver(nc->GetKey());
|
||||
pMsg->Send();
|
||||
@ -1631,7 +1631,7 @@ hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty)
|
||||
hsPoint3 trans = GetTarget(0)->GetLocalToWorld().GetTranslate() - follower->GetLocalToWorld().GetTranslate();
|
||||
if (trans.MagnitudeSquared() > 1) // we can be a bit fuzzy about this, since the particle system is rather large and people won't notice it being off
|
||||
{
|
||||
plWarpMsg *warp = TRACKED_NEW plWarpMsg(GetKey(), follower->GetKey(), plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity,
|
||||
plWarpMsg *warp = new plWarpMsg(GetKey(), follower->GetKey(), plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity,
|
||||
GetTarget(0)->GetLocalToWorld());
|
||||
warp->Send();
|
||||
|
||||
@ -1666,29 +1666,29 @@ void plArmatureMod::AddTarget(plSceneObject* so)
|
||||
|
||||
// attach a clothingSDLModifier to handle clothing saveState
|
||||
delete fClothingSDLMod;
|
||||
fClothingSDLMod = TRACKED_NEW plClothingSDLModifier;
|
||||
fClothingSDLMod = new plClothingSDLModifier;
|
||||
fClothingSDLMod->SetClothingOutfit(GetClothingOutfit()); // ok if clothingOutfit is nil at this point
|
||||
so->AddModifier(fClothingSDLMod);
|
||||
|
||||
// add avatar sdl modifier
|
||||
delete fAvatarSDLMod;
|
||||
fAvatarSDLMod = TRACKED_NEW plAvatarSDLModifier;
|
||||
fAvatarSDLMod = new plAvatarSDLModifier;
|
||||
so->AddModifier(fAvatarSDLMod);
|
||||
|
||||
delete fAvatarPhysicalSDLMod;
|
||||
fAvatarPhysicalSDLMod = TRACKED_NEW plAvatarPhysicalSDLModifier;
|
||||
fAvatarPhysicalSDLMod = new plAvatarPhysicalSDLModifier;
|
||||
so->AddModifier(fAvatarPhysicalSDLMod);
|
||||
|
||||
// At export time, this key will be nil. This is important, or else we'll overwrite the page the key comes from.
|
||||
if (fFootSoundSOKey != nil)
|
||||
hsgResMgr::ResMgr()->AddViaNotify(fFootSoundSOKey, TRACKED_NEW plAttachMsg(so->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(fFootSoundSOKey, new plAttachMsg(so->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef);
|
||||
if (fLinkSoundSOKey != nil)
|
||||
hsgResMgr::ResMgr()->AddViaNotify(fLinkSoundSOKey, TRACKED_NEW plAttachMsg(so->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(fLinkSoundSOKey, new plAttachMsg(so->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef);
|
||||
|
||||
if (fUpdateMsg)
|
||||
fUpdateMsg->UnRef(); // delete an old one.
|
||||
|
||||
fUpdateMsg = TRACKED_NEW plArmatureUpdateMsg(GetKey(), so->IsLocallyOwned(), true, this);
|
||||
fUpdateMsg = new plArmatureUpdateMsg(GetKey(), so->IsLocallyOwned(), true, this);
|
||||
}
|
||||
|
||||
void plArmatureMod::RemoveTarget(plSceneObject* so)
|
||||
@ -1772,7 +1772,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
|
||||
}
|
||||
|
||||
if( stream->ReadBool() )
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plClothingBase
|
||||
mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plClothingBase
|
||||
else
|
||||
fClothingOutfit = nil;
|
||||
|
||||
@ -1781,7 +1781,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
|
||||
if( stream->ReadBool() )
|
||||
{
|
||||
plKey effectMgrKey = mgr->ReadKey(stream);
|
||||
mgr->AddViaNotify(effectMgrKey, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plArmatureEffects
|
||||
mgr->AddViaNotify(effectMgrKey, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plArmatureEffects
|
||||
|
||||
// Attach the Footstep emitter scene object
|
||||
hsResMgr *mgr = hsgResMgr::ResMgr();
|
||||
@ -1810,7 +1810,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
|
||||
effectKey = mgr->ReRegister(nil, effectUoid);
|
||||
}
|
||||
if (effectKey != nil)
|
||||
mgr->AddViaNotify(effectKey, TRACKED_NEW plGenRefMsg(effectMgrKey, plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef);
|
||||
mgr->AddViaNotify(effectKey, new plGenRefMsg(effectMgrKey, plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef);
|
||||
|
||||
// Get the linking sound
|
||||
plUoid LinkUoid(gLoc, plSceneObject::Index(), "LinkSoundSource");
|
||||
@ -1882,14 +1882,14 @@ void plArmatureMod::IFinalize()
|
||||
|
||||
if (fWaitFlags & kNeedAudio)
|
||||
{
|
||||
plSetListenerMsg *msg = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVelocity, GetTarget(0)->GetKey(), true );
|
||||
plSetListenerMsg *msg = new plSetListenerMsg( plSetListenerMsg::kVelocity, GetTarget(0)->GetKey(), true );
|
||||
msg->Send();
|
||||
fWaitFlags &= ~kNeedAudio;
|
||||
}
|
||||
|
||||
if (fWaitFlags & kNeedCamera)
|
||||
{
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetCmd(plCameraMsg::kCreateNewDefaultCam);
|
||||
pMsg->SetCmd(plCameraMsg::kSetSubject);
|
||||
pMsg->SetSubject(GetTarget(0));
|
||||
@ -1925,7 +1925,7 @@ void plArmatureMod::ICustomizeApplicator()
|
||||
}
|
||||
}
|
||||
plAGModifier *volAGMod = const_cast<plAGModifier *>(agMod);
|
||||
fBoneRootAnimator = TRACKED_NEW plMatrixDelayedCorrectionApplicator();
|
||||
fBoneRootAnimator = new plMatrixDelayedCorrectionApplicator();
|
||||
volAGMod->SetApplicator(fBoneRootAnimator);
|
||||
fWaitFlags &= ~kNeedApplicator;
|
||||
}
|
||||
@ -2056,7 +2056,7 @@ hsBool plArmatureMod::ValidateMesh()
|
||||
// If we haven't created the mapping yet...
|
||||
if (fClothToSOMap.GetCount() <= i || fClothToSOMap[i] == nil)
|
||||
{
|
||||
plGenRefMsg *refMsg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, i, 0);
|
||||
plGenRefMsg *refMsg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, i, 0);
|
||||
hsgResMgr::ResMgr()->SendRef(meshObj->GetKey(), refMsg, plRefFlags::kPassiveRef);
|
||||
}
|
||||
}
|
||||
@ -2439,11 +2439,11 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at
|
||||
{
|
||||
plEventCallbackInterceptMsg *iMsg;
|
||||
|
||||
plArmatureEffectMsg *msg = TRACKED_NEW plArmatureEffectMsg(fEffects->GetKey(), kTime);
|
||||
plArmatureEffectMsg *msg = new plArmatureEffectMsg(fEffects->GetKey(), kTime);
|
||||
msg->fEventTime = time;
|
||||
msg->fTriggerIdx = AnimNameToIndex(anim->GetName());
|
||||
|
||||
iMsg = TRACKED_NEW plEventCallbackInterceptMsg();
|
||||
iMsg = new plEventCallbackInterceptMsg();
|
||||
iMsg->AddReceiver(fEffects->GetKey());
|
||||
iMsg->fEventTime = time;
|
||||
iMsg->fEvent = kTime;
|
||||
@ -2452,10 +2452,10 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at
|
||||
hsRefCnt_SafeUnRef(msg);
|
||||
hsRefCnt_SafeUnRef(iMsg);
|
||||
|
||||
plAvatarFootMsg* foot = TRACKED_NEW plAvatarFootMsg(GetKey(), this, isLeft);
|
||||
plAvatarFootMsg* foot = new plAvatarFootMsg(GetKey(), this, isLeft);
|
||||
foot->fEventTime = time;
|
||||
|
||||
iMsg = TRACKED_NEW plEventCallbackInterceptMsg();
|
||||
iMsg = new plEventCallbackInterceptMsg();
|
||||
iMsg->AddReceiver(fEffects->GetKey());
|
||||
iMsg->fEventTime = time;
|
||||
iMsg->fEvent = kTime;
|
||||
@ -2614,7 +2614,7 @@ void plArmatureLODMod::Read(hsStream *stream, hsResMgr *mgr)
|
||||
plKey meshKey = mgr->ReadKey(stream);
|
||||
fMeshKeys.push_back(meshKey);
|
||||
|
||||
plKeyVector *vec = TRACKED_NEW plKeyVector;
|
||||
plKeyVector *vec = new plKeyVector;
|
||||
int boneCount = stream->ReadLE32();
|
||||
for(int j = 0; j < boneCount; j++)
|
||||
vec->push_back(mgr->ReadKey(stream));
|
||||
@ -2790,7 +2790,7 @@ public:
|
||||
|
||||
plAvBoneMap::plAvBoneMap()
|
||||
{
|
||||
fImp = TRACKED_NEW BoneMapImp;
|
||||
fImp = new BoneMapImp;
|
||||
}
|
||||
|
||||
plAvBoneMap::~plAvBoneMap()
|
||||
|
@ -284,7 +284,7 @@ hsBool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
|
||||
&& fCurMode != kFallingOff
|
||||
&& fCurMode != kFinishing)
|
||||
{
|
||||
plClimbEventMsg* pMsg = TRACKED_NEW plClimbEventMsg;
|
||||
plClimbEventMsg* pMsg = new plClimbEventMsg;
|
||||
pMsg->SetSender(msg->fTarget);
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetBCastFlag(plMessage::kLocalPropagate);
|
||||
@ -679,20 +679,20 @@ void plAvBrainClimb::IProbeEnvironment()
|
||||
plKey ourKey = fAvMod->GetKey();
|
||||
|
||||
// *** would be cool if we could hint that these should be batched for spatial coherence optimization
|
||||
plLOSRequestMsg *upReq = TRACKED_NEW plLOSRequestMsg(ourKey, start, up, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit);
|
||||
plLOSRequestMsg *upReq = new plLOSRequestMsg(ourKey, start, up, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit);
|
||||
upReq->SetRequestID(static_cast<uint32_t>(plClimbMsg::kUp));
|
||||
upReq->Send();
|
||||
|
||||
plLOSRequestMsg *downReq = TRACKED_NEW plLOSRequestMsg(ourKey, start, down, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit);
|
||||
plLOSRequestMsg *downReq = new plLOSRequestMsg(ourKey, start, down, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit);
|
||||
downReq->SetRequestID(static_cast<uint32_t>(plClimbMsg::kDown));
|
||||
downReq->Send();
|
||||
|
||||
plLOSRequestMsg *leftReq = TRACKED_NEW plLOSRequestMsg(ourKey, start, left, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit);
|
||||
plLOSRequestMsg *leftReq = new plLOSRequestMsg(ourKey, start, left, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit);
|
||||
leftReq->SetRequestID(static_cast<uint32_t>(plClimbMsg::kLeft));
|
||||
leftReq->SetRequestType(plSimDefs::kLOSDBCustom);
|
||||
leftReq->Send();
|
||||
|
||||
plLOSRequestMsg *rightReq = TRACKED_NEW plLOSRequestMsg(ourKey, start, right, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit);
|
||||
plLOSRequestMsg *rightReq = new plLOSRequestMsg(ourKey, start, right, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit);
|
||||
rightReq->SetRequestID(static_cast<uint32_t>(plClimbMsg::kRight));
|
||||
rightReq->Send();
|
||||
|
||||
@ -732,52 +732,52 @@ void plAvBrainClimb::ICalcProbeLengths()
|
||||
// ---------------
|
||||
hsBool plAvBrainClimb::IInitAnimations()
|
||||
{
|
||||
fUp = TRACKED_NEW plAnimStage("WallClimbUp",
|
||||
fUp = new plAnimStage("WallClimbUp",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto,
|
||||
0);
|
||||
fDown = TRACKED_NEW plAnimStage("WallClimbDown",
|
||||
fDown = new plAnimStage("WallClimbDown",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto,
|
||||
0);
|
||||
fLeft = TRACKED_NEW plAnimStage("WallClimbLeft",
|
||||
fLeft = new plAnimStage("WallClimbLeft",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto,
|
||||
0);
|
||||
fRight = TRACKED_NEW plAnimStage("WallClimbRight",
|
||||
fRight = new plAnimStage("WallClimbRight",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto,
|
||||
0);
|
||||
// the mounts
|
||||
fMountUp = TRACKED_NEW plAnimStage("WallClimbMountUp",
|
||||
fMountUp = new plAnimStage("WallClimbMountUp",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
fMountDown = TRACKED_NEW plAnimStage("WallClimbMountDown",
|
||||
fMountDown = new plAnimStage("WallClimbMountDown",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
fMountLeft = TRACKED_NEW plAnimStage("WallClimbMountLeft",
|
||||
fMountLeft = new plAnimStage("WallClimbMountLeft",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
fMountRight = TRACKED_NEW plAnimStage("WallClimbMountRight",
|
||||
fMountRight = new plAnimStage("WallClimbMountRight",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
// and here's the dismount
|
||||
fDismountUp = TRACKED_NEW plAnimStage("WallClimbDismountUp",
|
||||
fDismountUp = new plAnimStage("WallClimbDismountUp",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
fDismountDown = TRACKED_NEW plAnimStage("WallClimbDismountDown",
|
||||
fDismountDown = new plAnimStage("WallClimbDismountDown",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
fDismountLeft = TRACKED_NEW plAnimStage("WallClimbDismountLeft",
|
||||
fDismountLeft = new plAnimStage("WallClimbDismountLeft",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
fDismountRight = TRACKED_NEW plAnimStage("WallClimbDismountUp",
|
||||
fDismountRight = new plAnimStage("WallClimbDismountUp",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
// other
|
||||
fIdle = TRACKED_NEW plAnimStage("WallClimbIdle",
|
||||
fIdle = new plAnimStage("WallClimbIdle",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
fRelease = TRACKED_NEW plAnimStage("WallClimbRelease",
|
||||
fRelease = new plAnimStage("WallClimbRelease",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
fFallOff = TRACKED_NEW plAnimStage("WallClimbFallOff",
|
||||
fFallOff = new plAnimStage("WallClimbFallOff",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
return true;
|
||||
@ -1049,4 +1049,4 @@ const char *plAvBrainClimb::ModeStr(Mode mode)
|
||||
default:
|
||||
return "WTF???!!!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ hsBool plAvBrainCoop::MsgReceive(plMessage *msg)
|
||||
|
||||
if(localPlayer == fGuestKey)
|
||||
{
|
||||
plAvCoopMsg *coopM = TRACKED_NEW plAvCoopMsg(plAvCoopMsg::kGuestAccepted, fInitiatorID, fInitiatorSerial);
|
||||
plAvCoopMsg *coopM = new plAvCoopMsg(plAvCoopMsg::kGuestAccepted, fInitiatorID, fInitiatorSerial);
|
||||
coopM->SetBCastFlag(plMessage::kNetPropagate);
|
||||
coopM->Send();
|
||||
|
||||
|
@ -193,12 +193,12 @@ void plAvBrainCritter::Activate(plArmatureModBase* avMod)
|
||||
plSceneObject* avObj = fArmature->GetTarget(0);
|
||||
plAGModifier* agMod = const_cast<plAGModifier*>(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index())));
|
||||
plPhysicalControllerCore* controller = avMod->GetController();
|
||||
fCallbackAction = TRACKED_NEW plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction = new plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction->ActivateController();
|
||||
}
|
||||
|
||||
// tell people that care that we are good to go
|
||||
plAIBrainCreatedMsg* brainCreated = TRACKED_NEW plAIBrainCreatedMsg(fArmature->GetKey());
|
||||
plAIBrainCreatedMsg* brainCreated = new plAIBrainCreatedMsg(fArmature->GetKey());
|
||||
plgDispatch::MsgSend(brainCreated);
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ void plAvBrainCritter::AddBehavior(const std::string& animationName, const std::
|
||||
return; // can't find it, die
|
||||
|
||||
// create the behavior and set it up
|
||||
CritterBehavior* behavior = TRACKED_NEW CritterBehavior(behaviorName, randomStartPos, fadeInLen, fadeOutLen);
|
||||
CritterBehavior* behavior = new CritterBehavior(behaviorName, randomStartPos, fadeInLen, fadeOutLen);
|
||||
fBehaviors.Push(behavior);
|
||||
behavior->Init(anim, loop, this, fAvMod, fBehaviors.Count() - 1);
|
||||
fUserBehaviors[behaviorName].push_back(fBehaviors.Count() - 1);
|
||||
@ -459,14 +459,14 @@ hsBool plAvBrainCritter::IInitBaseAnimations()
|
||||
CritterBehavior* behavior;
|
||||
if (idle)
|
||||
{
|
||||
fBehaviors[kIdle] = behavior = TRACKED_NEW CritterBehavior(kDefaultIdleBehName, true); // starts at a random start point each time
|
||||
fBehaviors[kIdle] = behavior = new CritterBehavior(kDefaultIdleBehName, true); // starts at a random start point each time
|
||||
behavior->Init(idle, true, this, fAvMod, kIdle);
|
||||
fUserBehaviors[kDefaultIdleBehName].push_back(kIdle);
|
||||
}
|
||||
|
||||
if (run)
|
||||
{
|
||||
fBehaviors[kRun] = behavior = TRACKED_NEW CritterBehavior(kDefaultRunBehName);
|
||||
fBehaviors[kRun] = behavior = new CritterBehavior(kDefaultRunBehName);
|
||||
behavior->Init(run, true, this, fAvMod, kRun);
|
||||
fUserBehaviors[kDefaultRunBehName].push_back(kRun);
|
||||
}
|
||||
@ -606,7 +606,7 @@ void plAvBrainCritter::IEvalGoal()
|
||||
// tell everyone who cares that we have arrived
|
||||
for (unsigned i = 0; i < fReceivers.size(); ++i)
|
||||
{
|
||||
plAIArrivedAtGoalMsg* msg = TRACKED_NEW plAIArrivedAtGoalMsg(fArmature->GetKey(), fReceivers[i]);
|
||||
plAIArrivedAtGoalMsg* msg = new plAIArrivedAtGoalMsg(fArmature->GetKey(), fReceivers[i]);
|
||||
msg->Goal(fFinalGoalPos);
|
||||
msg->Send();
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ void plAvBrainDrive::Activate(plArmatureModBase *avMod)
|
||||
plArmatureBrain::Activate(avMod);
|
||||
|
||||
IEnablePhysics(false, avMod->GetTarget(0)->GetKey());
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetCmd(plCameraMsg::kNonPhysOn);
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->Send();
|
||||
@ -87,7 +87,7 @@ void plAvBrainDrive::Deactivate()
|
||||
if (fAvMod)
|
||||
{
|
||||
IEnablePhysics(true, fAvMod->GetTarget(0)->GetKey());
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetCmd(plCameraMsg::kNonPhysOff);
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->Send();
|
||||
|
@ -83,7 +83,7 @@ const float plAvBrainGeneric::kDefaultFadeOut = 0.f; // instant fade out.
|
||||
// -----------------
|
||||
plAvBrainGeneric::plAvBrainGeneric()
|
||||
: fRecipient(nil),
|
||||
fStages(TRACKED_NEW plAnimStageVec),
|
||||
fStages(new plAnimStageVec),
|
||||
fCurStage(0),
|
||||
fType(kGeneric),
|
||||
fExitFlags(kExitNormal),
|
||||
@ -172,7 +172,7 @@ void plAvBrainGeneric::Activate(plArmatureModBase *avMod)
|
||||
|
||||
if ((GetType() == kEmote || GetType() == kAFK || GetType() == kSitOnGround) && fAvMod->IsLocalAvatar())
|
||||
{
|
||||
plInputIfaceMgrMsg* msg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableClickables );
|
||||
plInputIfaceMgrMsg* msg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableClickables );
|
||||
plgDispatch::MsgSend(msg);
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ void plAvBrainGeneric::Activate(plArmatureModBase *avMod)
|
||||
if (plAvBrainGeneric::fForce3rdPerson && fAvMod->IsLocalAvatar())
|
||||
{
|
||||
// create message to force 3rd person mode
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetCmd(plCameraMsg::kResponderSetThirdPerson);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
@ -307,7 +307,7 @@ void plAvBrainGeneric::Deactivate()
|
||||
if (plAvBrainGeneric::fForce3rdPerson && fAvMod->IsLocalAvatar())
|
||||
{
|
||||
// create message to force 3rd person mode
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
pMsg->SetCmd(plCameraMsg::kResponderUndoThirdPerson);
|
||||
@ -318,7 +318,7 @@ void plAvBrainGeneric::Deactivate()
|
||||
|
||||
if ((GetType() == kEmote || GetType() == kAFK || GetType() == kSitOnGround) && fAvMod->IsLocalAvatar())
|
||||
{
|
||||
plInputIfaceMgrMsg* msg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableClickables );
|
||||
plInputIfaceMgrMsg* msg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableClickables );
|
||||
plgDispatch::MsgSend(msg);
|
||||
}
|
||||
}
|
||||
@ -879,7 +879,7 @@ hsBool plAvBrainGeneric::LeaveAge()
|
||||
int plAvBrainGeneric::AddStage(plAnimStage *stage)
|
||||
{
|
||||
if(!fStages)
|
||||
fStages = TRACKED_NEW plAnimStageVec;
|
||||
fStages = new plAnimStageVec;
|
||||
fStages->push_back(stage);
|
||||
return fStages->size() - 1;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ void plAvBrainHuman::Activate(plArmatureModBase *avMod)
|
||||
plSceneObject* avObj = fArmature->GetTarget(0);
|
||||
plAGModifier* agMod = const_cast<plAGModifier*>(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index())));
|
||||
plPhysicalControllerCore* controller = avMod->GetController();
|
||||
fCallbackAction = TRACKED_NEW plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction = new plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction->ActivateController();
|
||||
}
|
||||
|
||||
@ -378,7 +378,7 @@ hsBool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
|
||||
case B_CONTROL_TOGGLE_PHYSICAL:
|
||||
{
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE // external clients can't go non-physical
|
||||
plAvBrainDrive *driver = TRACKED_NEW plAvBrainDrive(20, 1);
|
||||
plAvBrainDrive *driver = new plAvBrainDrive(20, 1);
|
||||
fAvMod->PushBrain(driver);
|
||||
#endif
|
||||
return true;
|
||||
@ -451,7 +451,7 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg)
|
||||
{
|
||||
if (swim->GetIsEntering())
|
||||
{
|
||||
plAvBrainSwim *swimBrain = TRACKED_NEW plAvBrainSwim();
|
||||
plAvBrainSwim *swimBrain = new plAvBrainSwim();
|
||||
swimBrain->MsgReceive(swim);
|
||||
fAvMod->PushBrain(swimBrain);
|
||||
}
|
||||
@ -466,13 +466,13 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg)
|
||||
{
|
||||
if(ride->Entering())
|
||||
{
|
||||
//plAvBrainRideAnimatedPhysical *rideBrain = TRACKED_NEW plAvBrainRideAnimatedPhysical();
|
||||
//plAvBrainRideAnimatedPhysical *rideBrain = new plAvBrainRideAnimatedPhysical();
|
||||
//fAvMod->PushBrain(rideBrain);
|
||||
delete fCallbackAction;
|
||||
plSceneObject* avObj = fArmature->GetTarget(0);
|
||||
plAGModifier* agMod = const_cast<plAGModifier*>(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index())));
|
||||
plPhysicalControllerCore* controller = fAvMod->GetController();
|
||||
fCallbackAction= TRACKED_NEW plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction= new plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction->ActivateController();
|
||||
|
||||
}
|
||||
@ -482,7 +482,7 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg)
|
||||
plSceneObject* avObj = fArmature->GetTarget(0);
|
||||
plAGModifier* agMod = const_cast<plAGModifier*>(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index())));
|
||||
plPhysicalControllerCore* controller = fAvMod->GetController();
|
||||
fCallbackAction= TRACKED_NEW plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction= new plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction->ActivateController();
|
||||
//hsStatusMessage("Got an exiting ride animated physical message");
|
||||
}
|
||||
@ -498,7 +498,7 @@ hsBool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
|
||||
{
|
||||
// let's build a seek task to get us to the attach point
|
||||
plKey seekTarget = msg->fTarget;
|
||||
plAvTaskSeek *seekTask = TRACKED_NEW plAvTaskSeek(seekTarget);
|
||||
plAvTaskSeek *seekTask = new plAvTaskSeek(seekTarget);
|
||||
QueueTask(seekTask);
|
||||
|
||||
// now a brain task to start the actual climb.
|
||||
@ -518,8 +518,8 @@ hsBool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
|
||||
startMode = plAvBrainClimb::kMountingRight;
|
||||
break;
|
||||
}
|
||||
plAvBrainClimb *brain = TRACKED_NEW plAvBrainClimb(startMode);
|
||||
plAvTaskBrain *brainTask = TRACKED_NEW plAvTaskBrain(brain);
|
||||
plAvBrainClimb *brain = new plAvBrainClimb(startMode);
|
||||
plAvTaskBrain *brainTask = new plAvTaskBrain(brain);
|
||||
QueueTask(brainTask);
|
||||
}
|
||||
// ** potentially controversial:
|
||||
@ -605,14 +605,14 @@ hsBool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg)
|
||||
if(seekM->fSmartSeek)
|
||||
{
|
||||
// use smart seek
|
||||
plAvTaskSeek * seek = TRACKED_NEW plAvTaskSeek(seekM);
|
||||
plAvTaskSeek * seek = new plAvTaskSeek(seekM);
|
||||
QueueTask(seek);
|
||||
}
|
||||
else
|
||||
if (!seekM->fNoSeek)
|
||||
{
|
||||
// use dumb seek
|
||||
plAvSeekTask *seek = TRACKED_NEW plAvSeekTask(seekM->fSeekPoint, seekM->fAlignType, seekM->fAnimName);
|
||||
plAvSeekTask *seek = new plAvSeekTask(seekM->fSeekPoint, seekM->fAlignType, seekM->fAnimName);
|
||||
QueueTask(seek);
|
||||
}
|
||||
// else don't seek at all.
|
||||
@ -621,14 +621,14 @@ hsBool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg)
|
||||
if(oneshotM)
|
||||
{
|
||||
// if it's a oneshot, add the oneshot task as well
|
||||
plAvOneShotTask *oneshot = TRACKED_NEW plAvOneShotTask(oneshotM, fAvMod, this);
|
||||
plAvOneShotTask *oneshot = new plAvOneShotTask(oneshotM, fAvMod, this);
|
||||
QueueTask(oneshot);
|
||||
}
|
||||
} else if (plAvPushBrainMsg *pushM = plAvPushBrainMsg::ConvertNoRef(msg)) {
|
||||
plAvTaskBrain * push = TRACKED_NEW plAvTaskBrain(pushM->fBrain);
|
||||
plAvTaskBrain * push = new plAvTaskBrain(pushM->fBrain);
|
||||
QueueTask(push);
|
||||
} else if (plAvPopBrainMsg *popM = plAvPopBrainMsg::ConvertNoRef(msg)) {
|
||||
plAvTaskBrain * pop = TRACKED_NEW plAvTaskBrain();
|
||||
plAvTaskBrain * pop = new plAvTaskBrain();
|
||||
QueueTask(pop);
|
||||
} else if (plAvTaskMsg *taskM = plAvTaskMsg::ConvertNoRef(msg)) {
|
||||
plAvTask *task = taskM->GetTask();
|
||||
@ -688,7 +688,7 @@ void plAvBrainHuman::TurnToPoint(hsPoint3 point)
|
||||
avPos = subworldCI->GetWorldToLocal() * avPos;
|
||||
}
|
||||
|
||||
plAvSeekMsg *msg = TRACKED_NEW plAvSeekMsg(nil, fAvMod->GetKey(), nil, 1.f, true);
|
||||
plAvSeekMsg *msg = new plAvSeekMsg(nil, fAvMod->GetKey(), nil, 1.f, true);
|
||||
hsClearBits(msg->fFlags, plAvSeekMsg::kSeekFlagForce3rdPersonOnStart);
|
||||
hsSetBits(msg->fFlags, plAvSeekMsg::kSeekFlagNoWarpOnTimeout | plAvSeekMsg::kSeekFlagRotationOnly);
|
||||
msg->fTargetLookAt = point;
|
||||
@ -705,10 +705,10 @@ void plAvBrainHuman::IChatOn()
|
||||
if (!fAvMod->FindAnimInstance(chatAnimName))
|
||||
{
|
||||
plKey avKey = fAvMod->GetKey();
|
||||
plAvAnimTask *animTask = TRACKED_NEW plAvAnimTask(chatAnimName, 0.0, 1.0, 1.0, 0.0, true, true, true);
|
||||
plAvAnimTask *animTask = new plAvAnimTask(chatAnimName, 0.0, 1.0, 1.0, 0.0, true, true, true);
|
||||
if (animTask)
|
||||
{
|
||||
plAvTaskMsg *taskMsg = TRACKED_NEW plAvTaskMsg(avKey, avKey, animTask);
|
||||
plAvTaskMsg *taskMsg = new plAvTaskMsg(avKey, avKey, animTask);
|
||||
taskMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
taskMsg->Send();
|
||||
}
|
||||
@ -721,10 +721,10 @@ void plAvBrainHuman::IChatOff()
|
||||
{
|
||||
char *chatAnimName = fAvMod->MakeAnimationName("Talk");
|
||||
plKey avKey = fAvMod->GetKey();
|
||||
plAvAnimTask *animTask = TRACKED_NEW plAvAnimTask(chatAnimName, -1.0);
|
||||
plAvAnimTask *animTask = new plAvAnimTask(chatAnimName, -1.0);
|
||||
if (animTask)
|
||||
{
|
||||
plAvTaskMsg *taskMsg = TRACKED_NEW plAvTaskMsg(avKey, avKey, animTask);
|
||||
plAvTaskMsg *taskMsg = new plAvTaskMsg(avKey, avKey, animTask);
|
||||
taskMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
taskMsg->Send();
|
||||
}
|
||||
@ -761,62 +761,62 @@ hsBool plAvBrainHuman::IInitAnimations()
|
||||
{
|
||||
plHBehavior *behavior;
|
||||
fBehaviors.SetCountAndZero(kHuBehaviorMax);
|
||||
fBehaviors[kIdle] = behavior = TRACKED_NEW Idle;
|
||||
fBehaviors[kIdle] = behavior = new Idle;
|
||||
behavior->Init(idle, true, this, fAvMod, kDefaultFade, kDefaultFade, kIdle, plHBehavior::kBehaviorTypeIdle);
|
||||
behavior->SetStrength(1.f, 0.f);
|
||||
|
||||
fBehaviors[kWalk] = behavior = TRACKED_NEW Walk;
|
||||
fBehaviors[kWalk] = behavior = new Walk;
|
||||
behavior->Init(walk, true, this, fAvMod, kDefaultFade, 5.f, kWalk, plHBehavior::kBehaviorTypeWalk);
|
||||
|
||||
fBehaviors[kRun] = behavior = TRACKED_NEW Run;
|
||||
fBehaviors[kRun] = behavior = new Run;
|
||||
behavior->Init(run, true, this, fAvMod, kDefaultFade, 2.0, kRun, plHBehavior::kBehaviorTypeRun);
|
||||
|
||||
fBehaviors[kWalkBack] = behavior = TRACKED_NEW WalkBack;
|
||||
fBehaviors[kWalkBack] = behavior = new WalkBack;
|
||||
behavior->Init(walkBack, true, this, fAvMod, kDefaultFade, kDefaultFade, kWalkBack, plHBehavior::kBehaviorTypeWalkBack);
|
||||
|
||||
fBehaviors[kStandingTurnLeft] = behavior = TRACKED_NEW StandingTurnLeft;
|
||||
fBehaviors[kStandingTurnLeft] = behavior = new StandingTurnLeft;
|
||||
behavior->Init(standingLeft, true, this, fAvMod, 3.0f, 6.0f, kStandingTurnLeft, plHBehavior::kBehaviorTypeTurnLeft);
|
||||
|
||||
fBehaviors[kStandingTurnRight] = behavior = TRACKED_NEW StandingTurnRight;
|
||||
fBehaviors[kStandingTurnRight] = behavior = new StandingTurnRight;
|
||||
behavior->Init(standingRight, true, this, fAvMod, 3.0f, 6.0f, kStandingTurnRight, plHBehavior::kBehaviorTypeTurnRight);
|
||||
|
||||
fBehaviors[kStepLeft] = behavior = TRACKED_NEW StepLeft;
|
||||
fBehaviors[kStepLeft] = behavior = new StepLeft;
|
||||
behavior->Init(stepLeft, true, this, fAvMod, kDefaultFade, kDefaultFade, kStepLeft, plHBehavior::kBehaviorTypeSidestepLeft);
|
||||
|
||||
fBehaviors[kStepRight] = behavior = TRACKED_NEW StepRight;
|
||||
fBehaviors[kStepRight] = behavior = new StepRight;
|
||||
behavior->Init(stepRight, true, this, fAvMod, kDefaultFade, kDefaultFade, kStepRight, plHBehavior::kBehaviorTypeSidestepRight);
|
||||
|
||||
// Warning: Changing the blend times of the jump animations will affect the path you take, because until we're fully blended,
|
||||
// we won't be using the full motion defined in the animation. This isn't an issue for standing jump, but you need to be
|
||||
// aware of it for the walk/run jumps.
|
||||
fBehaviors[kFall] = behavior = TRACKED_NEW Fall;
|
||||
fBehaviors[kFall] = behavior = new Fall;
|
||||
behavior->Init(fall, true, this, fAvMod, 1.0f, 10, kFall, plHBehavior::kBehaviorTypeFall);
|
||||
|
||||
fBehaviors[kStandingJump] = behavior = TRACKED_NEW StandingJump;
|
||||
fBehaviors[kStandingJump] = behavior = new StandingJump;
|
||||
behavior->Init(standJump, false, this, fAvMod, kDefaultFade, kDefaultFade, kStandingJump, plHBehavior::kBehaviorTypeStandingJump);
|
||||
|
||||
fBehaviors[kWalkingJump] = behavior = TRACKED_NEW WalkingJump;
|
||||
fBehaviors[kWalkingJump] = behavior = new WalkingJump;
|
||||
behavior->Init(walkJump, false, this, fAvMod, 10, 3.0, kWalkingJump, plHBehavior::kBehaviorTypeWalkingJump);
|
||||
|
||||
fBehaviors[kRunningJump] = behavior = TRACKED_NEW RunningJump;
|
||||
fBehaviors[kRunningJump] = behavior = new RunningJump;
|
||||
behavior->Init(runJump, false, this, fAvMod, 10, 2.0, kRunningJump, plHBehavior::kBehaviorTypeRunningJump);
|
||||
|
||||
fBehaviors[kGroundImpact] = behavior = TRACKED_NEW GroundImpact;
|
||||
fBehaviors[kGroundImpact] = behavior = new GroundImpact;
|
||||
behavior->Init(groundImpact, false, this, fAvMod, 6.0f, kDefaultFade, kGroundImpact, plHBehavior::kBehaviorTypeGroundImpact);
|
||||
|
||||
fBehaviors[kRunningImpact] = behavior = TRACKED_NEW RunningImpact;
|
||||
fBehaviors[kRunningImpact] = behavior = new RunningImpact;
|
||||
behavior->Init(runningImpact, false, this, fAvMod, 6.0f, kDefaultFade, kRunningImpact, plHBehavior::kBehaviorTypeRunningImpact);
|
||||
|
||||
fBehaviors[kMovingTurnLeft] = behavior = TRACKED_NEW MovingTurnLeft;
|
||||
fBehaviors[kMovingTurnLeft] = behavior = new MovingTurnLeft;
|
||||
behavior->Init(movingLeft, true, this, fAvMod, kDefaultFade, kDefaultFade, kMovingTurnLeft, plHBehavior::kBehaviorTypeMovingTurnLeft);
|
||||
|
||||
fBehaviors[kMovingTurnRight] = behavior = TRACKED_NEW MovingTurnRight;
|
||||
fBehaviors[kMovingTurnRight] = behavior = new MovingTurnRight;
|
||||
behavior->Init(movingRight, true, this, fAvMod, kDefaultFade, kDefaultFade, kMovingTurnRight, plHBehavior::kBehaviorTypeMovingTurnRight);
|
||||
|
||||
fBehaviors[kPushWalk] = behavior = TRACKED_NEW PushWalk;
|
||||
fBehaviors[kPushWalk] = behavior = new PushWalk;
|
||||
behavior->Init(pushWalk, true, this, fAvMod, kDefaultFade, kDefaultFade, kPushWalk, plHBehavior::kBehaviorTypePushWalk);
|
||||
|
||||
//fBehaviors[kPushIdle] = behavior = TRACKED_NEW PushIdle;
|
||||
//fBehaviors[kPushIdle] = behavior = new PushIdle;
|
||||
//behavior->Init(pushIdle, true, this, fAvMod, kDefaultFade, kDefaultFade, kPushIdle, plHBehavior::kBehaviorTypePushIdle);
|
||||
|
||||
result = true;
|
||||
@ -879,7 +879,7 @@ hsBool plAvBrainHuman::LeaveAge()
|
||||
delete fCallbackAction;
|
||||
plSceneObject* avObj = fArmature->GetTarget(0);
|
||||
plAGModifier* agMod = const_cast<plAGModifier*>(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index())));
|
||||
fCallbackAction= TRACKED_NEW plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction= new plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction->ActivateController();
|
||||
}
|
||||
plArmatureBrain::LeaveAge();
|
||||
@ -1386,32 +1386,32 @@ bool PushSimpleMultiStage(plArmatureMod *avatar, const char *enterAnim, const ch
|
||||
// key. otherwise, we'll loop until someone sends a message telling us explicitly to advance
|
||||
plAnimStage::AdvanceType idleAdvance = autoExit ? plAnimStage::kAdvanceOnMove : plAnimStage::kAdvanceNone;
|
||||
|
||||
plAnimStageVec *v = TRACKED_NEW plAnimStageVec;
|
||||
plAnimStage *s1 = TRACKED_NEW plAnimStage(enterAnim,
|
||||
plAnimStageVec *v = new plAnimStageVec;
|
||||
plAnimStage *s1 = new plAnimStage(enterAnim,
|
||||
0,
|
||||
plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
v->push_back(s1);
|
||||
plAnimStage *s2 = TRACKED_NEW plAnimStage(idleAnim, 0,
|
||||
plAnimStage *s2 = new plAnimStage(idleAnim, 0,
|
||||
plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
idleAdvance, plAnimStage::kRegressNone,
|
||||
-1);
|
||||
v->push_back(s2);
|
||||
plAnimStage *s3 = TRACKED_NEW plAnimStage(exitAnim, 0,
|
||||
plAnimStage *s3 = new plAnimStage(exitAnim, 0,
|
||||
plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone,
|
||||
0);
|
||||
v->push_back(s3);
|
||||
|
||||
plAvBrainGeneric *b = TRACKED_NEW plAvBrainGeneric(v, nil, nil, nil, plAvBrainGeneric::kExitAnyTask | plAvBrainGeneric::kExitNewBrain,
|
||||
plAvBrainGeneric *b = new plAvBrainGeneric(v, nil, nil, nil, plAvBrainGeneric::kExitAnyTask | plAvBrainGeneric::kExitNewBrain,
|
||||
2.0f, 2.0f, plAvBrainGeneric::kMoveStandstill);
|
||||
|
||||
b->SetBodyUsage(bodyUsage);
|
||||
b->SetType(type);
|
||||
|
||||
plAvTaskBrain *bt = TRACKED_NEW plAvTaskBrain(b);
|
||||
plAvTaskMsg *btm = TRACKED_NEW plAvTaskMsg(plAvatarMgr::GetInstance()->GetKey(), avatar->GetKey(), bt);
|
||||
plAvTaskBrain *bt = new plAvTaskBrain(b);
|
||||
plAvTaskMsg *btm = new plAvTaskMsg(plAvatarMgr::GetInstance()->GetKey(), avatar->GetKey(), bt);
|
||||
if(netPropagate)
|
||||
btm->SetBCastFlag(plMessage::kNetPropagate);
|
||||
btm->Send();
|
||||
@ -1440,23 +1440,23 @@ bool AvatarEmote(plArmatureMod *avatar, const char *emoteName)
|
||||
plKey avKey = avatar->GetKey();
|
||||
float fadeIn = emote->GetFadeIn();
|
||||
float fadeOut = emote->GetFadeOut();
|
||||
plAnimStage *s1 = TRACKED_NEW plAnimStage(emoteName,
|
||||
plAnimStage *s1 = new plAnimStage(emoteName,
|
||||
0,
|
||||
plAnimStage::kForwardAuto,
|
||||
plAnimStage::kBackNone,
|
||||
plAnimStage::kAdvanceOnMove,
|
||||
plAnimStage::kRegressNone,
|
||||
0);
|
||||
plAnimStageVec *v = TRACKED_NEW plAnimStageVec;
|
||||
plAnimStageVec *v = new plAnimStageVec;
|
||||
v->push_back(s1);
|
||||
|
||||
plAvBrainGeneric *b = TRACKED_NEW plAvBrainGeneric(v, nil, nil, nil,
|
||||
plAvBrainGeneric *b = new plAvBrainGeneric(v, nil, nil, nil,
|
||||
plAvBrainGeneric::kExitAnyInput | plAvBrainGeneric::kExitNewBrain | plAvBrainGeneric::kExitAnyTask,
|
||||
2.0f, 2.0f, huBrain->IsActor() ? plAvBrainGeneric::kMoveRelative : plAvBrainGeneric::kMoveStandstill);
|
||||
b->SetType(plAvBrainGeneric::kEmote);
|
||||
b->SetBodyUsage(emote->GetBodyUsage());
|
||||
plAvTaskBrain *bt = TRACKED_NEW plAvTaskBrain(b);
|
||||
plAvTaskMsg *btm = TRACKED_NEW plAvTaskMsg(plAvatarMgr::GetInstance()->GetKey(), avKey, bt);
|
||||
plAvTaskBrain *bt = new plAvTaskBrain(b);
|
||||
plAvTaskMsg *btm = new plAvTaskMsg(plAvatarMgr::GetInstance()->GetKey(), avKey, bt);
|
||||
btm->SetBCastFlag(plMessage::kNetPropagate);
|
||||
btm->Send();
|
||||
|
||||
|
@ -57,7 +57,7 @@ void plAvBrainRideAnimatedPhysical::Activate(plArmatureModBase *avMod)
|
||||
plSceneObject* avObj = fArmature->GetTarget(0);
|
||||
plAGModifier* agMod = const_cast<plAGModifier*>(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index())));
|
||||
plPhysicalControllerCore* controller = avMod->GetController();
|
||||
fCallbackAction = TRACKED_NEW plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction = new plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller);
|
||||
fCallbackAction->ActivateController();
|
||||
}
|
||||
}
|
||||
@ -118,62 +118,62 @@ hsBool plAvBrainRideAnimatedPhysical::IInitAnimations()
|
||||
{
|
||||
plHBehavior *behavior;
|
||||
fBehaviors.SetCountAndZero(kHuBehaviorMax);
|
||||
fBehaviors[kIdle] = behavior = TRACKED_NEW Idle;
|
||||
fBehaviors[kIdle] = behavior = new Idle;
|
||||
behavior->Init(idle, true, this, fAvMod, kDefaultFade, kDefaultFade, kIdle, plHBehavior::kBehaviorTypeIdle);
|
||||
behavior->SetStrength(1.f, 0.f);
|
||||
|
||||
fBehaviors[kWalk] = behavior = TRACKED_NEW Walk;
|
||||
fBehaviors[kWalk] = behavior = new Walk;
|
||||
behavior->Init(walk, true, this, fAvMod, kDefaultFade, 5.f, kWalk, plHBehavior::kBehaviorTypeWalk);
|
||||
|
||||
fBehaviors[kRun] = behavior = TRACKED_NEW Run;
|
||||
fBehaviors[kRun] = behavior = new Run;
|
||||
behavior->Init(run, true, this, fAvMod, kDefaultFade, 2.0, kRun, plHBehavior::kBehaviorTypeRun);
|
||||
|
||||
fBehaviors[kWalkBack] = behavior = TRACKED_NEW WalkBack;
|
||||
fBehaviors[kWalkBack] = behavior = new WalkBack;
|
||||
behavior->Init(walkBack, true, this, fAvMod, kDefaultFade, kDefaultFade, kWalkBack, plHBehavior::kBehaviorTypeWalkBack);
|
||||
|
||||
fBehaviors[kStandingTurnLeft] = behavior = TRACKED_NEW StandingTurnLeft;
|
||||
fBehaviors[kStandingTurnLeft] = behavior = new StandingTurnLeft;
|
||||
behavior->Init(standingLeft, true, this, fAvMod, 3.0f, 6.0f, kStandingTurnLeft, plHBehavior::kBehaviorTypeTurnLeft);
|
||||
|
||||
fBehaviors[kStandingTurnRight] = behavior = TRACKED_NEW StandingTurnRight;
|
||||
fBehaviors[kStandingTurnRight] = behavior = new StandingTurnRight;
|
||||
behavior->Init(standingRight, true, this, fAvMod, 3.0f, 6.0f, kStandingTurnRight, plHBehavior::kBehaviorTypeTurnRight);
|
||||
|
||||
fBehaviors[kStepLeft] = behavior = TRACKED_NEW StepLeft;
|
||||
fBehaviors[kStepLeft] = behavior = new StepLeft;
|
||||
behavior->Init(stepLeft, true, this, fAvMod, kDefaultFade, kDefaultFade, kStepLeft, plHBehavior::kBehaviorTypeSidestepLeft);
|
||||
|
||||
fBehaviors[kStepRight] = behavior = TRACKED_NEW StepRight;
|
||||
fBehaviors[kStepRight] = behavior = new StepRight;
|
||||
behavior->Init(stepRight, true, this, fAvMod, kDefaultFade, kDefaultFade, kStepRight, plHBehavior::kBehaviorTypeSidestepRight);
|
||||
|
||||
// Warning: Changing the blend times of the jump animations will affect the path you take, because until we're fully blended,
|
||||
// we won't be using the full motion defined in the animation. This isn't an issue for standing jump, but you need to be
|
||||
// aware of it for the walk/run jumps.
|
||||
fBehaviors[kFall] = behavior = TRACKED_NEW Fall;
|
||||
fBehaviors[kFall] = behavior = new Fall;
|
||||
behavior->Init(fall, true, this, fAvMod, 1.0f, 10, kFall, plHBehavior::kBehaviorTypeFall);
|
||||
|
||||
fBehaviors[kStandingJump] = behavior = TRACKED_NEW StandingJump;
|
||||
fBehaviors[kStandingJump] = behavior = new StandingJump;
|
||||
behavior->Init(standJump, false, this, fAvMod, kDefaultFade, kDefaultFade, kStandingJump, plHBehavior::kBehaviorTypeStandingJump);
|
||||
|
||||
fBehaviors[kWalkingJump] = behavior = TRACKED_NEW WalkingJump;
|
||||
fBehaviors[kWalkingJump] = behavior = new WalkingJump;
|
||||
behavior->Init(walkJump, false, this, fAvMod, 10, 3.0, kWalkingJump, plHBehavior::kBehaviorTypeWalkingJump);
|
||||
|
||||
fBehaviors[kRunningJump] = behavior = TRACKED_NEW RunningJump;
|
||||
fBehaviors[kRunningJump] = behavior = new RunningJump;
|
||||
behavior->Init(runJump, false, this, fAvMod, 10, 2.0, kRunningJump, plHBehavior::kBehaviorTypeRunningJump);
|
||||
|
||||
fBehaviors[kGroundImpact] = behavior = TRACKED_NEW GroundImpact;
|
||||
fBehaviors[kGroundImpact] = behavior = new GroundImpact;
|
||||
behavior->Init(groundImpact, false, this, fAvMod, 6.0f, kDefaultFade, kGroundImpact, plHBehavior::kBehaviorTypeGroundImpact);
|
||||
|
||||
fBehaviors[kRunningImpact] = behavior = TRACKED_NEW RunningImpact;
|
||||
fBehaviors[kRunningImpact] = behavior = new RunningImpact;
|
||||
behavior->Init(runningImpact, false, this, fAvMod, 6.0f, kDefaultFade, kRunningImpact, plHBehavior::kBehaviorTypeRunningImpact);
|
||||
|
||||
fBehaviors[kMovingTurnLeft] = behavior = TRACKED_NEW MovingTurnLeft;
|
||||
fBehaviors[kMovingTurnLeft] = behavior = new MovingTurnLeft;
|
||||
behavior->Init(movingLeft, true, this, fAvMod, kDefaultFade, kDefaultFade, kMovingTurnLeft, plHBehavior::kBehaviorTypeMovingTurnLeft);
|
||||
|
||||
fBehaviors[kMovingTurnRight] = behavior = TRACKED_NEW MovingTurnRight;
|
||||
fBehaviors[kMovingTurnRight] = behavior = new MovingTurnRight;
|
||||
behavior->Init(movingRight, true, this, fAvMod, kDefaultFade, kDefaultFade, kMovingTurnRight, plHBehavior::kBehaviorTypeMovingTurnRight);
|
||||
|
||||
fBehaviors[kPushWalk] = behavior = TRACKED_NEW PushWalk;
|
||||
fBehaviors[kPushWalk] = behavior = new PushWalk;
|
||||
behavior->Init(pushWalk, true, this, fAvMod, kDefaultFade, kDefaultFade, kPushWalk, plHBehavior::kBehaviorTypePushWalk);
|
||||
|
||||
//fBehaviors[kPushIdle] = behavior = TRACKED_NEW PushIdle;
|
||||
//fBehaviors[kPushIdle] = behavior = new PushIdle;
|
||||
//behavior->Init(pushIdle, true, this, fAvMod, kDefaultFade, kDefaultFade, kPushIdle, plHBehavior::kBehaviorTypePushIdle);
|
||||
|
||||
result = true;
|
||||
|
@ -241,7 +241,7 @@ plAvBrainSwim::plAvBrainSwim() :
|
||||
fMode(kWalking),
|
||||
fSurfaceDistance(0.f)
|
||||
{
|
||||
fSurfaceProbeMsg = TRACKED_NEW plLOSRequestMsg();
|
||||
fSurfaceProbeMsg = new plLOSRequestMsg();
|
||||
fSurfaceProbeMsg->SetReportType(plLOSRequestMsg::kReportHitOrMiss);
|
||||
fSurfaceProbeMsg->SetRequestType(plSimDefs::kLOSDBSwimRegion);
|
||||
fSurfaceProbeMsg->SetTestType(plLOSRequestMsg::kTestAny);
|
||||
@ -277,11 +277,11 @@ hsBool plAvBrainSwim::Apply(double time, float elapsed)
|
||||
if (huBrain && !huBrain->fCallbackAction->IsOnGround())
|
||||
{
|
||||
// We're jumping in! Trigger splash effect (sound)
|
||||
plArmatureEffectMsg *msg = TRACKED_NEW plArmatureEffectMsg(fAvMod->GetArmatureEffects()->GetKey(), kTime);
|
||||
plArmatureEffectMsg *msg = new plArmatureEffectMsg(fAvMod->GetArmatureEffects()->GetKey(), kTime);
|
||||
msg->fEventTime = (float)time;
|
||||
msg->fTriggerIdx = plArmatureMod::kImpact;
|
||||
|
||||
plEventCallbackInterceptMsg *iMsg = TRACKED_NEW plEventCallbackInterceptMsg;
|
||||
plEventCallbackInterceptMsg *iMsg = new plEventCallbackInterceptMsg;
|
||||
iMsg->AddReceiver(fAvMod->GetArmatureEffects()->GetKey());
|
||||
iMsg->fEventTime = (float)time;
|
||||
iMsg->fEvent = kTime;
|
||||
@ -381,7 +381,7 @@ hsBool plAvBrainSwim::MsgReceive(plMessage *msg)
|
||||
if (!seekM->fNoSeek)
|
||||
{
|
||||
// use dumb seek
|
||||
plAvSeekTask *seek = TRACKED_NEW plAvSeekTask(seekM->fSeekPoint, seekM->fAlignType, seekM->fAnimName);
|
||||
plAvSeekTask *seek = new plAvSeekTask(seekM->fSeekPoint, seekM->fAlignType, seekM->fAnimName);
|
||||
QueueTask(seek);
|
||||
}
|
||||
// else don't seek at all.
|
||||
@ -390,7 +390,7 @@ hsBool plAvBrainSwim::MsgReceive(plMessage *msg)
|
||||
if(oneshotM)
|
||||
{
|
||||
// if it's a oneshot, add the oneshot task as well
|
||||
plAvOneShotTask *oneshot = TRACKED_NEW plAvOneShotTask(oneshotM, fAvMod, this);
|
||||
plAvOneShotTask *oneshot = new plAvOneShotTask(oneshotM, fAvMod, this);
|
||||
QueueTask(oneshot);
|
||||
}
|
||||
return true;
|
||||
@ -464,7 +464,7 @@ void plAvBrainSwim::IStartWading()
|
||||
|
||||
if (fAvMod->IsLocalAvatar())
|
||||
{
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
pMsg->SetCmd(plCameraMsg::kResponderUndoThirdPerson);
|
||||
@ -487,7 +487,7 @@ void plAvBrainSwim::IStartSwimming(bool is2D)
|
||||
|
||||
if (fAvMod->IsLocalAvatar())
|
||||
{
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
pMsg->SetCmd(plCameraMsg::kResponderSetThirdPerson);
|
||||
@ -535,34 +535,34 @@ hsBool plAvBrainSwim::IInitAnimations()
|
||||
static const float defaultFade = 2.0f;
|
||||
fBehaviors.SetCountAndZero(kSwimBehaviorMax);
|
||||
plSwimBehavior *behavior;
|
||||
fBehaviors[kTreadWater] = behavior = TRACKED_NEW TreadWater;
|
||||
fBehaviors[kTreadWater] = behavior = new TreadWater;
|
||||
behavior->Init(treadWater, true, this, fAvMod, kTreadWater);
|
||||
|
||||
fBehaviors[kSwimForward] = behavior = TRACKED_NEW SwimForward;
|
||||
fBehaviors[kSwimForward] = behavior = new SwimForward;
|
||||
behavior->Init(swimForward, true, this, fAvMod, kSwimForward);
|
||||
|
||||
fBehaviors[kSwimForwardFast] = behavior = TRACKED_NEW SwimForwardFast;
|
||||
fBehaviors[kSwimForwardFast] = behavior = new SwimForwardFast;
|
||||
behavior->Init(swimForwardFast, true, this, fAvMod, kSwimForwardFast);
|
||||
|
||||
fBehaviors[kSwimBack] = behavior = TRACKED_NEW SwimBack;
|
||||
fBehaviors[kSwimBack] = behavior = new SwimBack;
|
||||
behavior->Init(swimBack, true, this, fAvMod, kSwimBack);
|
||||
|
||||
fBehaviors[kSwimLeft] = behavior = TRACKED_NEW SwimLeft;
|
||||
fBehaviors[kSwimLeft] = behavior = new SwimLeft;
|
||||
behavior->Init(swimLeft, true, this, fAvMod, kSwimLeft);
|
||||
|
||||
fBehaviors[kSwimRight] = behavior = TRACKED_NEW SwimRight;
|
||||
fBehaviors[kSwimRight] = behavior = new SwimRight;
|
||||
behavior->Init(swimRight, true, this, fAvMod, kSwimRight);
|
||||
|
||||
fBehaviors[kSwimTurnLeft] = behavior = TRACKED_NEW SwimTurnLeft;
|
||||
fBehaviors[kSwimTurnLeft] = behavior = new SwimTurnLeft;
|
||||
behavior->Init(nil, true, this, fAvMod, kSwimTurnLeft);
|
||||
|
||||
fBehaviors[kSwimTurnRight] = behavior = TRACKED_NEW SwimTurnRight;
|
||||
fBehaviors[kSwimTurnRight] = behavior = new SwimTurnRight;
|
||||
behavior->Init(nil, true, this, fAvMod, kSwimTurnRight);
|
||||
|
||||
fBehaviors[kTreadTurnLeft] = behavior = TRACKED_NEW TreadTurnLeft;
|
||||
fBehaviors[kTreadTurnLeft] = behavior = new TreadTurnLeft;
|
||||
behavior->Init(treadWaterLeft, true, this, fAvMod, kTreadTurnLeft);
|
||||
|
||||
fBehaviors[kTreadTurnRight] = behavior = TRACKED_NEW TreadTurnRight;
|
||||
fBehaviors[kTreadTurnRight] = behavior = new TreadTurnRight;
|
||||
behavior->Init(treadWaterRight, true, this, fAvMod, kTreadTurnRight);
|
||||
|
||||
return true;
|
||||
@ -641,7 +641,7 @@ hsBool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
|
||||
case B_CONTROL_TOGGLE_PHYSICAL:
|
||||
{
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE // external clients can't go non-physical
|
||||
plAvBrainDrive *driver = TRACKED_NEW plAvBrainDrive(20, 1);
|
||||
plAvBrainDrive *driver = new plAvBrainDrive(20, 1);
|
||||
fAvMod->PushBrain(driver);
|
||||
#endif
|
||||
return true;
|
||||
|
@ -113,7 +113,7 @@ plWalkingController::plWalkingController(plSceneObject* rootObject, plAGApplicat
|
||||
{
|
||||
if (fController)
|
||||
{
|
||||
fWalkingStrategy= TRACKED_NEW plWalkingStrategy(fController);
|
||||
fWalkingStrategy= new plWalkingStrategy(fController);
|
||||
fController->SetMovementSimulationInterface(fWalkingStrategy);
|
||||
}
|
||||
else
|
||||
@ -178,7 +178,7 @@ void plWalkingController::Reset(bool newAge)
|
||||
}
|
||||
else
|
||||
{
|
||||
fWalkingStrategy= TRACKED_NEW plWalkingStrategy(fController);
|
||||
fWalkingStrategy= new plWalkingStrategy(fController);
|
||||
fWalkingStrategy->RefreshConnectionToControllerCore();
|
||||
|
||||
}
|
||||
@ -404,7 +404,7 @@ plSwimmingController::plSwimmingController(plSceneObject* rootObject, plAGApplic
|
||||
:plAnimatedController(rootObject,rootApp,controller)
|
||||
{
|
||||
if (controller)
|
||||
fSwimmingStrategy= TRACKED_NEW plSwimStrategy(controller);
|
||||
fSwimmingStrategy= new plSwimStrategy(controller);
|
||||
else
|
||||
fSwimmingStrategy = nil;
|
||||
}
|
||||
@ -417,7 +417,7 @@ plRidingAnimatedPhysicalController::plRidingAnimatedPhysicalController(plSceneOb
|
||||
: plWalkingController(rootObject, rootApp, controller)
|
||||
{
|
||||
if(controller)
|
||||
fWalkingStrategy = TRACKED_NEW plRidingAnimatedPhysicalStrategy(controller);
|
||||
fWalkingStrategy = new plRidingAnimatedPhysicalStrategy(controller);
|
||||
else
|
||||
fWalkingStrategy = nil;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void plAvLadderMod::ITriggerSelf(plKey avKey)
|
||||
{
|
||||
plKey avPhysKey = avKey;
|
||||
// I'm going to lie and pretend it's from the avatar. the alternative is lengthy and unreadable.
|
||||
plNotifyMsg *notifyMsg = TRACKED_NEW plNotifyMsg(avPhysKey, GetKey());
|
||||
plNotifyMsg *notifyMsg = new plNotifyMsg(avPhysKey, GetKey());
|
||||
notifyMsg->fID = kNotifyTrigger;
|
||||
notifyMsg->Send();
|
||||
fAvatarMounting = true;
|
||||
@ -266,9 +266,9 @@ void plAvLadderMod::EmitCommand(const plKey receiver)
|
||||
traverseName = "LadderDown";
|
||||
}
|
||||
|
||||
plAnimStageVec *v = TRACKED_NEW plAnimStageVec;
|
||||
plAnimStageVec *v = new plAnimStageVec;
|
||||
|
||||
plAnimStage *s1 = TRACKED_NEW plAnimStage(mountName,
|
||||
plAnimStage *s1 = new plAnimStage(mountName,
|
||||
0,
|
||||
plAnimStage::kForwardAuto,
|
||||
plAnimStage::kBackAuto,
|
||||
@ -282,7 +282,7 @@ void plAvLadderMod::EmitCommand(const plKey receiver)
|
||||
// if loops is zero, we don't need the traverse animation at all.
|
||||
if(fLoops)
|
||||
{
|
||||
plAnimStage *s2 = TRACKED_NEW plAnimStage(traverseName,
|
||||
plAnimStage *s2 = new plAnimStage(traverseName,
|
||||
0,
|
||||
plAnimStage::kForwardKey,
|
||||
plAnimStage::kBackKey,
|
||||
@ -296,7 +296,7 @@ void plAvLadderMod::EmitCommand(const plKey receiver)
|
||||
s2->SetReverseOnIdle(true);
|
||||
v->push_back(s2);
|
||||
}
|
||||
plAnimStage *s3 = TRACKED_NEW plAnimStage(dismountName,
|
||||
plAnimStage *s3 = new plAnimStage(dismountName,
|
||||
0,
|
||||
plAnimStage::kForwardAuto,
|
||||
plAnimStage::kBackAuto,
|
||||
@ -307,12 +307,12 @@ void plAvLadderMod::EmitCommand(const plKey receiver)
|
||||
s3->SetReverseOnIdle(true);
|
||||
v->push_back(s3);
|
||||
|
||||
plNotifyMsg* enterNotify = TRACKED_NEW plNotifyMsg(GetKey(), GetKey());
|
||||
plNotifyMsg* enterNotify = new plNotifyMsg(GetKey(), GetKey());
|
||||
enterNotify->fID = kNotifyAvatarOnLadder;
|
||||
|
||||
uint32_t exitFlags = plAvBrainGeneric::kExitNormal;
|
||||
|
||||
plAvBrainGeneric *ladBrain = TRACKED_NEW plAvBrainGeneric(v, enterNotify, nil, nil, exitFlags, plAvBrainGeneric::kDefaultFadeIn,
|
||||
plAvBrainGeneric *ladBrain = new plAvBrainGeneric(v, enterNotify, nil, nil, exitFlags, plAvBrainGeneric::kDefaultFadeIn,
|
||||
plAvBrainGeneric::kDefaultFadeOut, plAvBrainGeneric::kMoveRelative);
|
||||
ladBrain->SetType(plAvBrainGeneric::kLadder);
|
||||
ladBrain->SetReverseFBControlsOnRelease(!fGoingUp);
|
||||
@ -321,9 +321,9 @@ void plAvLadderMod::EmitCommand(const plKey receiver)
|
||||
|
||||
// Very important that we dumb seek here. Otherwise you can run off the edge of a ladder, and seek will be helpless
|
||||
// until you hit the ground, at which point you have no hope of successfully seeking.
|
||||
plAvSeekMsg *seeker = TRACKED_NEW plAvSeekMsg(nil, avKey, seekKey, 1.0f, false);
|
||||
plAvSeekMsg *seeker = new plAvSeekMsg(nil, avKey, seekKey, 1.0f, false);
|
||||
seeker->Send();
|
||||
plAvPushBrainMsg *brainer = TRACKED_NEW plAvPushBrainMsg(nil, avKey, ladBrain);
|
||||
plAvPushBrainMsg *brainer = new plAvPushBrainMsg(nil, avKey, ladBrain);
|
||||
brainer->Send();
|
||||
}
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ hsBool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double
|
||||
if (plAvOneShotTask::fForce3rdPerson && avatar->IsLocalAvatar() && (fFlags & plAvSeekMsg::kSeekFlagForce3rdPersonOnStart))
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
pMsg->SetCmd(plCameraMsg::kResponderSetThirdPerson);
|
||||
@ -281,7 +281,7 @@ void plAvTaskSeek::Finish(plArmatureMod *avatar, plArmatureBrain *brain, double
|
||||
if (plAvOneShotTask::fForce3rdPerson && avatar->IsLocalAvatar() && (fFlags & plAvSeekMsg::kSeekFlagUnForce3rdPersonOnFinish))
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
pMsg->SetCmd(plCameraMsg::kResponderUndoThirdPerson);
|
||||
@ -293,7 +293,7 @@ void plAvTaskSeek::Finish(plArmatureMod *avatar, plArmatureBrain *brain, double
|
||||
|
||||
if (fNotifyFinishedKey)
|
||||
{
|
||||
plAvTaskSeekDoneMsg *msg = TRACKED_NEW plAvTaskSeekDoneMsg(avatar->GetKey(), fNotifyFinishedKey);
|
||||
plAvTaskSeekDoneMsg *msg = new plAvTaskSeekDoneMsg(avatar->GetKey(), fNotifyFinishedKey);
|
||||
msg->fAborted = (fState == kSeekAbort);
|
||||
msg->Send();
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void plClothingItem::Read(hsStream *s, hsResMgr *mgr)
|
||||
fCustomText = s->ReadSafeString();
|
||||
fDescription = s->ReadSafeString();
|
||||
if (s->ReadBool())
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // thumbnail
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // thumbnail
|
||||
|
||||
int tileCount = s->ReadLE32();
|
||||
int i, j;
|
||||
@ -190,23 +190,23 @@ void plClothingItem::Read(hsStream *s, hsResMgr *mgr)
|
||||
for (j = 0; j < layerCount; j++)
|
||||
{
|
||||
int layer = s->ReadByte();
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plElementRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1, nil, layer), plRefFlags::kActiveRef); // texture
|
||||
mgr->ReadKeyNotifyMe(s, new plElementRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1, nil, layer), plRefFlags::kActiveRef); // texture
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < kMaxNumLODLevels; i++)
|
||||
{
|
||||
if (s->ReadBool())
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1), plRefFlags::kActiveRef); // shared mesh
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1), plRefFlags::kActiveRef); // shared mesh
|
||||
}
|
||||
|
||||
fElements.SetCountAndZero(tileCount);
|
||||
if (plClothingMgr::GetClothingMgr())
|
||||
{
|
||||
plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(plClothingMgr::GetClothingMgr()->GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
plGenRefMsg *msg = new plGenRefMsg(plClothingMgr::GetClothingMgr()->GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(GetKey(), msg, plRefFlags::kActiveRef);
|
||||
}
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // forced accessory
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // forced accessory
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
@ -313,7 +313,7 @@ hsBool plClothingItem::MsgReceive(plMessage* msg)
|
||||
fElementNames.Set(eMsg->fWhich, hsStrcpy(eMsg->fElementName));
|
||||
if (fTextures.Get(eMsg->fWhich) == nil)
|
||||
{
|
||||
plMipmap **layers = TRACKED_NEW plMipmap*[plClothingElement::kLayerMax];
|
||||
plMipmap **layers = new plMipmap*[plClothingElement::kLayerMax];
|
||||
int i;
|
||||
for (i = 0; i < plClothingElement::kLayerMax; i++)
|
||||
layers[i] = nil;
|
||||
@ -393,7 +393,7 @@ void plClothingBase::Read(hsStream* s, hsResMgr* mgr)
|
||||
|
||||
fName = s->ReadSafeString();
|
||||
if (s->ReadBool())
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef);
|
||||
fLayoutName = s->ReadSafeString();
|
||||
}
|
||||
|
||||
@ -456,7 +456,7 @@ void plClothingOutfit::AddItem(plClothingItem *item, hsBool update /* = true */,
|
||||
if (fItems.Find(item) != fItems.kMissingIndex)
|
||||
return;
|
||||
|
||||
plClothingMsg *msg = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
msg->AddCommand(plClothingMsg::kAddItem);
|
||||
msg->fItemKey = item->GetKey();
|
||||
@ -477,7 +477,7 @@ void plClothingOutfit::AddItem(plClothingItem *item, hsBool update /* = true */,
|
||||
|
||||
void plClothingOutfit::ForceUpdate(bool retry)
|
||||
{
|
||||
plClothingMsg *msg = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddCommand(plClothingMsg::kUpdateTexture);
|
||||
if (retry)
|
||||
msg->AddCommand(plClothingMsg::kRetry); // force a resend
|
||||
@ -489,7 +489,7 @@ void plClothingOutfit::RemoveItem(plClothingItem *item, hsBool update /* = true
|
||||
if (fItems.Find(item) == fItems.kMissingIndex)
|
||||
return;
|
||||
|
||||
plClothingMsg *msg = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
msg->AddCommand(plClothingMsg::kRemoveItem);
|
||||
msg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
@ -506,7 +506,7 @@ void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, fl
|
||||
hsBool update /* = true */, hsBool broadcast /* = true */, hsBool netForce /* = false */,
|
||||
hsBool retry /* = true */, uint8_t layer /* = kLayerTint1 */)
|
||||
{
|
||||
plClothingMsg *msg = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
msg->AddCommand(plClothingMsg::kTintItem);
|
||||
msg->fItemKey = item->GetKey();
|
||||
@ -529,7 +529,7 @@ void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, fl
|
||||
void plClothingOutfit::TintSkin(float red, float green, float blue,
|
||||
hsBool update /* = true */, hsBool broadcast /* = true */)
|
||||
{
|
||||
plClothingMsg *msg = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
msg->AddCommand(plClothingMsg::kTintSkin);
|
||||
msg->fColor.Set(red, green, blue, 1.f);
|
||||
@ -544,7 +544,7 @@ void plClothingOutfit::TintSkin(float red, float green, float blue,
|
||||
void plClothingOutfit::MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight,
|
||||
hsBool retry /* = true */)
|
||||
{
|
||||
plClothingMsg *msg = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
msg->AddCommand(plClothingMsg::kMorphItem);
|
||||
msg->fItemKey = item->GetKey();
|
||||
@ -563,7 +563,7 @@ void plClothingOutfit::SetAge(float age, hsBool update /* = true */, hsBool broa
|
||||
|
||||
void plClothingOutfit::SetSkinBlend(float blend, uint8_t layer, hsBool update /* = true */, hsBool broadcast /* = true */)
|
||||
{
|
||||
plClothingMsg *msg = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
msg->AddCommand(plClothingMsg::kBlendSkin);
|
||||
msg->fLayer = layer;
|
||||
@ -618,7 +618,7 @@ void plClothingOutfit::IAddItem(plClothingItem *item)
|
||||
break;
|
||||
}
|
||||
fItems.Insert(i, item);
|
||||
plClothingItemOptions *op = TRACKED_NEW plClothingItemOptions;
|
||||
plClothingItemOptions *op = new plClothingItemOptions;
|
||||
fOptions.Insert(i, op);
|
||||
IInstanceSharedMeshes(item);
|
||||
fDirtyItems.SetBit(item->fTileset);
|
||||
@ -745,12 +745,12 @@ void plClothingOutfit::Read(hsStream* s, hsResMgr* mgr)
|
||||
plSynchedObject::Read(s, mgr);
|
||||
|
||||
fGroup = s->ReadByte();
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plClothingBase
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plClothingBase
|
||||
|
||||
if (fGroup != plClothingMgr::kClothingBaseNoOptions)
|
||||
{
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // target layer
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // material
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // target layer
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // material
|
||||
}
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plPreResourceMsg::Index(), GetKey());
|
||||
//ReadItems(s, mgr, false);
|
||||
@ -827,7 +827,7 @@ void plClothingOutfit::ReadFromVault()
|
||||
plStateDataRecord::ReadStreamHeader(&ram, &sdlRecName, &sdlRecVersion);
|
||||
plStateDescriptor * desc = plSDLMgr::GetInstance()->FindDescriptor(sdlRecName, sdlRecVersion);
|
||||
if (desc) {
|
||||
plStateDataRecord * sdlDataRec = TRACKED_NEW plStateDataRecord(desc);
|
||||
plStateDataRecord * sdlDataRec = new plStateDataRecord(desc);
|
||||
if (sdlDataRec->Read(&ram, 0)) {
|
||||
if (!strcmp(sdlRecName, kSDLMorphSequence))
|
||||
IHandleMorphSDR(sdlDataRec);
|
||||
@ -849,7 +849,7 @@ void plClothingOutfit::ReadFromVault()
|
||||
|
||||
void plClothingOutfit::SaveCustomizations(hsBool retry /* = true */)
|
||||
{
|
||||
plClothingMsg *msg = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
msg->AddCommand(plClothingMsg::kSaveCustomizations);
|
||||
if (retry)
|
||||
@ -901,7 +901,7 @@ void plClothingOutfit::WriteToVault(const ARRAY(plStateDataRecord*) & SDRs)
|
||||
for (unsigned i = 0; i < morphsSDRs.GetCount(); ++i) {
|
||||
for (unsigned j = 0; j < fAvatar->GetNumLOD(); j++) {
|
||||
if (fAvatar->GetClothingSO(j) == morphsSDRs[i]->GetTarget(0)) {
|
||||
plStateDataRecord * morphSDR = TRACKED_NEW plStateDataRecord(kSDLMorphSequence);
|
||||
plStateDataRecord * morphSDR = new plStateDataRecord(kSDLMorphSequence);
|
||||
plSimpleStateVariable * lodVar = morphSDR->FindVar(plMorphSequenceSDLMod::kStrTargetID);
|
||||
if (lodVar)
|
||||
lodVar->Set((int)j);
|
||||
@ -997,7 +997,7 @@ void plClothingOutfit::IUpdate()
|
||||
if (avMod->GetClothingOutfit()==this)
|
||||
{
|
||||
// Let the GUI know we changed clothes
|
||||
plClothingUpdateBCMsg *BCMsg = TRACKED_NEW plClothingUpdateBCMsg();
|
||||
plClothingUpdateBCMsg *BCMsg = new plClothingUpdateBCMsg();
|
||||
BCMsg->SetSender(GetKey());
|
||||
plgDispatch::MsgSend(BCMsg);
|
||||
}
|
||||
@ -1311,12 +1311,12 @@ hsBool plClothingOutfit::MsgReceive(plMessage* msg)
|
||||
{
|
||||
if (cMsg->GetCommand(plClothingMsg::kAddItem))
|
||||
{
|
||||
plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
plGenRefMsg *msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(cMsg->fItemKey, msg, plRefFlags::kActiveRef);
|
||||
plClothingItem *accessory = plClothingItem::ConvertNoRef(cMsg->fItemKey->GetObjectPtr())->fAccessory;
|
||||
if (accessory)
|
||||
{
|
||||
plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
plGenRefMsg *msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(accessory->GetKey(), msg, plRefFlags::kActiveRef);
|
||||
}
|
||||
}
|
||||
@ -1392,7 +1392,7 @@ hsBool plClothingOutfit::MsgReceive(plMessage* msg)
|
||||
// as a solo command, so that it happens after any other AddViaNotify messages
|
||||
if (cMsg->ResendUpdate())
|
||||
{
|
||||
plClothingMsg *update = TRACKED_NEW plClothingMsg();
|
||||
plClothingMsg *update = new plClothingMsg();
|
||||
update->AddReceiver(GetKey());
|
||||
update->AddCommand(plClothingMsg::kUpdateTexture);
|
||||
plgDispatch::MsgSend(update);
|
||||
@ -1744,7 +1744,7 @@ hsBool plClothingMgr::IsLRMatch(plClothingItem *item1, plClothingItem *item2)
|
||||
|
||||
void plClothingMgr::Init()
|
||||
{
|
||||
fInstance = TRACKED_NEW plClothingMgr;
|
||||
fInstance = new plClothingMgr;
|
||||
fInstance->RegisterAs(kClothingMgr_KEY);
|
||||
fInstance->IInit();
|
||||
}
|
||||
@ -1752,7 +1752,7 @@ void plClothingMgr::Init()
|
||||
void plClothingMgr::IInit()
|
||||
{
|
||||
plClothingElement::GetElements(fElements);
|
||||
plClothingLayout *layout = TRACKED_NEW plClothingLayout("BasicHuman", 1024);
|
||||
plClothingLayout *layout = new plClothingLayout("BasicHuman", 1024);
|
||||
layout->fElements.Append(FindElementByName("shirt-chest"));
|
||||
layout->fElements.Append(FindElementByName("shirt-sleeve"));
|
||||
layout->fElements.Append(FindElementByName("face"));
|
||||
|
@ -110,7 +110,7 @@ plAvatarMgr * plAvatarMgr::GetInstance()
|
||||
{
|
||||
if(!fInstance)
|
||||
{
|
||||
fInstance = TRACKED_NEW plAvatarMgr;
|
||||
fInstance = new plAvatarMgr;
|
||||
fInstance->RegisterAs(kAvatarMgr_KEY);
|
||||
fInstance->Ref();
|
||||
}
|
||||
@ -210,7 +210,7 @@ plKey plAvatarMgr::LoadAvatar(const char *name, const char *accountName, bool is
|
||||
if (loc.IsValid())
|
||||
{
|
||||
plUoid uID(loc, plSceneObject::Index(), theName);
|
||||
plLoadAvatarMsg *cloneMsg = TRACKED_NEW plLoadAvatarMsg (uID, requestor, 0, isPlayer, spawnPoint, initialTask, userStr);
|
||||
plLoadAvatarMsg *cloneMsg = new plLoadAvatarMsg (uID, requestor, 0, isPlayer, spawnPoint, initialTask, userStr);
|
||||
result = cloneMsg->GetCloneKey();
|
||||
|
||||
// the clone message is automatically addressed to the net client manager
|
||||
@ -224,7 +224,7 @@ plKey plAvatarMgr::LoadAvatar(const char *name, const char *accountName, bool is
|
||||
void plAvatarMgr::UnLoadAvatar(plKey avatarKey, bool isPlayer)
|
||||
{
|
||||
hsBool isLoading = false;
|
||||
plLoadAvatarMsg *msg = TRACKED_NEW plLoadAvatarMsg(avatarKey, GetKey(), 0, isPlayer, isLoading);
|
||||
plLoadAvatarMsg *msg = new plLoadAvatarMsg(avatarKey, GetKey(), 0, isPlayer, isLoading);
|
||||
msg->Send();
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ void plAvatarMgr::PropagateLocalPlayer(int spawnPoint)
|
||||
plKey requestor = GetKey();
|
||||
bool isPlayer = true;
|
||||
hsBool isLoading = true;
|
||||
plLoadAvatarMsg *msg = TRACKED_NEW plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading);
|
||||
plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading);
|
||||
|
||||
if (spawnPoint >= 0)
|
||||
{
|
||||
@ -267,7 +267,7 @@ bool plAvatarMgr::UnPropagateLocalPlayer()
|
||||
plKey requestor = GetKey();
|
||||
bool isPlayer = true;
|
||||
hsBool isLoading = false;
|
||||
plLoadAvatarMsg *msg = TRACKED_NEW plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading);
|
||||
plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading);
|
||||
msg->SetBCastFlag(plMessage::kLocalPropagate, false);
|
||||
msg->Send();
|
||||
return true;
|
||||
@ -283,7 +283,7 @@ void plAvatarMgr::UnLoadRemotePlayer(plKey remotePlayer)
|
||||
plKey requestor = GetKey();
|
||||
bool isPlayer = true;
|
||||
hsBool isLoading = false;
|
||||
plLoadAvatarMsg * msg = TRACKED_NEW plLoadAvatarMsg(remotePlayer, requestor, 0, isPlayer, isLoading);
|
||||
plLoadAvatarMsg * msg = new plLoadAvatarMsg(remotePlayer, requestor, 0, isPlayer, isLoading);
|
||||
|
||||
// don't propagate over the network. this is just for removing our local version
|
||||
msg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
@ -300,7 +300,7 @@ void plAvatarMgr::UnLoadLocalPlayer()
|
||||
plKey mgrKey = GetKey();
|
||||
bool isPlayer = true;
|
||||
hsBool isLoading = false;
|
||||
plLoadAvatarMsg *msg = TRACKED_NEW plLoadAvatarMsg(playerKey, mgrKey, 0, isPlayer, isLoading);
|
||||
plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, mgrKey, 0, isPlayer, isLoading);
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
@ -471,7 +471,7 @@ void plAvatarMgr::IFinishLoadingAvatar(plLoadAvatarMsg *cloneMsg)
|
||||
// *** might want to move this to the human brain so we can make sure the
|
||||
// *** avatar is sufficiently initialized before anyone accesses him
|
||||
bool isLocal = cloneMsg->GetOriginatingPlayerID() == plNetClientMgr::GetInstance()->GetPlayerID();
|
||||
plPlayerPageMsg* pageM = TRACKED_NEW plPlayerPageMsg;
|
||||
plPlayerPageMsg* pageM = new plPlayerPageMsg;
|
||||
pageM->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pageM->fLocallyOriginated = isLocal;
|
||||
pageM->fPlayer = avatarKey;
|
||||
@ -482,7 +482,7 @@ void plAvatarMgr::IFinishLoadingAvatar(plLoadAvatarMsg *cloneMsg)
|
||||
|
||||
// This can probably be replaced by the plPlayerPageMsg:
|
||||
// ...keeping for the moment for compatibility
|
||||
plMemberUpdateMsg* mu = TRACKED_NEW plMemberUpdateMsg;
|
||||
plMemberUpdateMsg* mu = new plMemberUpdateMsg;
|
||||
mu->Send();
|
||||
}
|
||||
|
||||
@ -498,7 +498,7 @@ void plAvatarMgr::IFinishUnloadingAvatar(plLoadAvatarMsg *cloneMsg)
|
||||
plKey avatar = cloneMsg->GetCloneKey();
|
||||
|
||||
bool isLocal = cloneMsg->GetOriginatingPlayerID() == plNetClientMgr::GetInstance()->GetPlayerID();
|
||||
plPlayerPageMsg *pageM = TRACKED_NEW plPlayerPageMsg;
|
||||
plPlayerPageMsg *pageM = new plPlayerPageMsg;
|
||||
pageM->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pageM->fLocallyOriginated = isLocal;
|
||||
pageM->fPlayer = avatar;
|
||||
@ -510,7 +510,7 @@ void plAvatarMgr::IFinishUnloadingAvatar(plLoadAvatarMsg *cloneMsg)
|
||||
}
|
||||
|
||||
// check on this...can it be subsumed by plPlayerPageMsg ?
|
||||
plMemberUpdateMsg *mu = TRACKED_NEW plMemberUpdateMsg;
|
||||
plMemberUpdateMsg *mu = new plMemberUpdateMsg;
|
||||
mu->Send();
|
||||
}
|
||||
|
||||
@ -834,7 +834,7 @@ int plAvatarMgr::WarpPlayerToAnother(hsBool iMove, uint32_t remoteID)
|
||||
if (!localSO)
|
||||
return plCCRError::kNilLocalAvatar;
|
||||
|
||||
plWarpMsg *warp = TRACKED_NEW plWarpMsg(nil, (iMove ? localSO->GetKey() : remoteSO->GetKey()),
|
||||
plWarpMsg *warp = new plWarpMsg(nil, (iMove ? localSO->GetKey() : remoteSO->GetKey()),
|
||||
plWarpMsg::kFlushTransform, (iMove ? remoteSO->GetLocalToWorld() : localSO->GetLocalToWorld()));
|
||||
|
||||
warp->SetBCastFlag(plMessage::kNetPropagate);
|
||||
@ -853,7 +853,7 @@ int plAvatarMgr::WarpPlayerToXYZ(float x, float y, float z)
|
||||
hsVector3 v(x, y, z);
|
||||
m.SetTranslate(&v);
|
||||
|
||||
plWarpMsg *warp = TRACKED_NEW plWarpMsg(nil, localSO->GetKey(), plWarpMsg::kFlushTransform, m);
|
||||
plWarpMsg *warp = new plWarpMsg(nil, localSO->GetKey(), plWarpMsg::kFlushTransform, m);
|
||||
warp->SetBCastFlag(plMessage::kNetPropagate);
|
||||
plgDispatch::MsgSend(warp);
|
||||
|
||||
@ -873,7 +873,7 @@ int plAvatarMgr::WarpPlayerToXYZ(int pid, float x, float y, float z)
|
||||
hsVector3 v(x, y, z);
|
||||
m.SetTranslate(&v);
|
||||
|
||||
plWarpMsg *warp = TRACKED_NEW plWarpMsg(nil, player->GetKey(), 0, m);
|
||||
plWarpMsg *warp = new plWarpMsg(nil, player->GetKey(), 0, m);
|
||||
warp->SetBCastFlag(plMessage::kNetPropagate);
|
||||
plgDispatch::MsgSend(warp);
|
||||
|
||||
@ -899,7 +899,7 @@ void plAvatarMgr::RemoveMaintainersMarker(plMaintainersMarkerModifier *mm)
|
||||
void plAvatarMgr::PointToDniCoordinate(hsPoint3 pt, plDniCoordinateInfo* ret)
|
||||
{
|
||||
int count = fMaintainersMarkers.Count();
|
||||
// plDniCoordinateInfo ret = TRACKED_NEW plDniCoordinateInfo;
|
||||
// plDniCoordinateInfo ret = new plDniCoordinateInfo;
|
||||
if (count > 0)
|
||||
{
|
||||
|
||||
@ -1007,14 +1007,14 @@ void plAvatarMgr::OfferLinkingBook(plKey hostKey, plKey guestKey, plMessage *lin
|
||||
{
|
||||
|
||||
// make the host brain
|
||||
plAvBrainCoop * brainH = TRACKED_NEW plAvBrainCoop(plAvBrainGeneric::kExitNormal, 3.0, 3.0, plAvBrainGeneric::kMoveRelative, guestKey);
|
||||
plAvBrainCoop * brainH = new plAvBrainCoop(plAvBrainGeneric::kExitNormal, 3.0, 3.0, plAvBrainGeneric::kMoveRelative, guestKey);
|
||||
|
||||
plAnimStage *hostOffer = TRACKED_NEW plAnimStage("BookOffer", plAnimStage::kNotifyAdvance); // autoforward, autoadvance
|
||||
plAnimStage *hostOffer = new plAnimStage("BookOffer", plAnimStage::kNotifyAdvance); // autoforward, autoadvance
|
||||
// repeats until the guest brain tells us that it's done
|
||||
plAnimStage *hostIdle = TRACKED_NEW plAnimStage("BookOfferIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage *hostIdle = new plAnimStage("BookOfferIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage::kAdvanceNone, plAnimStage::kRegressNone, -1);
|
||||
|
||||
plAnimStage *hostFinish = TRACKED_NEW plAnimStage("BookOfferFinish", plAnimStage::kNotifyAdvance); // autoforward, autoadvance
|
||||
plAnimStage *hostFinish = new plAnimStage("BookOfferFinish", plAnimStage::kNotifyAdvance); // autoforward, autoadvance
|
||||
|
||||
brainH->AddStage(hostOffer);
|
||||
brainH->AddStage(hostIdle);
|
||||
@ -1025,19 +1025,19 @@ void plAvatarMgr::OfferLinkingBook(plKey hostKey, plKey guestKey, plMessage *lin
|
||||
|
||||
|
||||
// make the guest brain
|
||||
plAvBrainCoop * brainG = TRACKED_NEW plAvBrainCoop(plAvBrainGeneric::kExitNormal, 3.0, 3.0, plAvBrainGeneric::kMoveRelative,
|
||||
plAvBrainCoop * brainG = new plAvBrainCoop(plAvBrainGeneric::kExitNormal, 3.0, 3.0, plAvBrainGeneric::kMoveRelative,
|
||||
hostID, (uint16_t)hostSerial, hostKey);
|
||||
|
||||
plAnimStage *guestAccept = TRACKED_NEW plAnimStage("BookAccept", plAnimStage::kNotifyAdvance);
|
||||
plAnimStage *guestAcceptIdle = TRACKED_NEW plAnimStage("BookAcceptIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage *guestAccept = new plAnimStage("BookAccept", plAnimStage::kNotifyAdvance);
|
||||
plAnimStage *guestAcceptIdle = new plAnimStage("BookAcceptIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage::kAdvanceNone, plAnimStage::kRegressNone, -1);
|
||||
|
||||
brainG->AddStage(guestAccept);
|
||||
brainG->AddStage(guestAcceptIdle);
|
||||
plCoopCoordinator *coord = TRACKED_NEW plCoopCoordinator(hostKey, guestKey, brainH, brainG, "Convergence", 1, 1, linkMsg, true);
|
||||
plCoopCoordinator *coord = new plCoopCoordinator(hostKey, guestKey, brainH, brainG, "Convergence", 1, 1, linkMsg, true);
|
||||
|
||||
|
||||
plAvCoopMsg *coMg = TRACKED_NEW plAvCoopMsg(hostKey, coord);
|
||||
plAvCoopMsg *coMg = new plAvCoopMsg(hostKey, coord);
|
||||
coMg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
coMg->SetBCastFlag(plMessage::kNetForce);
|
||||
|
||||
|
@ -299,7 +299,7 @@ void plAvatarSDLModifier::IPutClimbBrainIn(plArmatureMod *avMod, plAvBrainClimb
|
||||
|
||||
void plAvatarSDLModifier::ISetClimbBrainFrom(plArmatureMod *avMod, const plStateDataRecord* srcState)
|
||||
{
|
||||
plAvBrainClimb *climbBrain = TRACKED_NEW plAvBrainClimb();
|
||||
plAvBrainClimb *climbBrain = new plAvBrainClimb();
|
||||
avMod->PushBrain(climbBrain);
|
||||
climbBrain->LoadFromSDL(srcState);
|
||||
}
|
||||
@ -311,7 +311,7 @@ void plAvatarSDLModifier::IPutDriveBrainIn(plArmatureMod *avMod, plAvBrainDrive
|
||||
|
||||
void plAvatarSDLModifier::ISetDriveBrainFrom(plArmatureMod *avMod, const plStateDataRecord* src)
|
||||
{
|
||||
plAvBrainDrive *driveBrain = TRACKED_NEW plAvBrainDrive();
|
||||
plAvBrainDrive *driveBrain = new plAvBrainDrive();
|
||||
avMod->PushBrain(driveBrain);
|
||||
}
|
||||
|
||||
@ -357,7 +357,7 @@ bool plAvatarSDLModifier::ISetGenericBrainFrom(plArmatureMod *avMod, const plSta
|
||||
return false;
|
||||
}
|
||||
|
||||
plAnimStageVec * stages = TRACKED_NEW plAnimStageVec();
|
||||
plAnimStageVec * stages = new plAnimStageVec();
|
||||
for (int j = 0; j < numStages; j++)
|
||||
{
|
||||
plStateDataRecord* stageState = stagesVar->GetStateDataRecord(j);
|
||||
@ -418,7 +418,7 @@ bool plAvatarSDLModifier::ISetGenericBrainFrom(plArmatureMod *avMod, const plSta
|
||||
}
|
||||
|
||||
plAvBrainGeneric *newBrain =
|
||||
TRACKED_NEW plAvBrainGeneric(stages,
|
||||
new plAvBrainGeneric(stages,
|
||||
nil, nil,
|
||||
callbackRcvr,
|
||||
exitFlags,
|
||||
@ -499,7 +499,7 @@ plAnimStage * plAvatarSDLModifier::IGetStageFrom(plArmatureMod *avMod, const plS
|
||||
|
||||
// ***!!! need to capture "advanceTo" and "regressTo" values!!!
|
||||
bool hackAdvanceToWrong = false, hackRegressToWrong = false;
|
||||
plAnimStage *newStage = TRACKED_NEW plAnimStage(name,
|
||||
plAnimStage *newStage = new plAnimStage(name,
|
||||
(uint8_t)notifyFlags,
|
||||
static_cast<plAnimStage::ForwardType>(fwd),
|
||||
static_cast<plAnimStage::BackType>(bwd),
|
||||
|
@ -132,7 +132,7 @@ void plAvTask::ILimitPlayersInput(plArmatureMod *avatar)
|
||||
{
|
||||
plInputInterfaceMgr::GetInstance()->ForceCursorHidden(true);
|
||||
// tell the KI to be disabled while we are busy
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kTempDisableKIandBB);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kTempDisableKIandBB);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
}
|
||||
@ -144,7 +144,7 @@ void plAvTask::IUndoLimitPlayersInput(plArmatureMod *avatar)
|
||||
{
|
||||
plInputInterfaceMgr::GetInstance()->ForceCursorHidden(false);
|
||||
// tell the KI to be re-enabled
|
||||
pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kTempEnableKIandBB);
|
||||
pfKIMsg* msg = new pfKIMsg(pfKIMsg::kTempEnableKIandBB);
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
}
|
||||
@ -597,7 +597,7 @@ hsBool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, dou
|
||||
{
|
||||
// Must do the physics re-enable through a callback so that it happens before the "done" callback and we don't
|
||||
// step over some script's attempt to disable physics again.
|
||||
plAvatarPhysicsEnableCallbackMsg *epMsg = TRACKED_NEW plAvatarPhysicsEnableCallbackMsg(avatar->GetKey(), kStop, 0, 0, 0, 0);
|
||||
plAvatarPhysicsEnableCallbackMsg *epMsg = new plAvatarPhysicsEnableCallbackMsg(avatar->GetKey(), kStop, 0, 0, 0, 0);
|
||||
fAnimInstance->GetTimeConvert()->AddCallback(epMsg);
|
||||
hsRefCnt_SafeUnRef(epMsg);
|
||||
}
|
||||
@ -633,7 +633,7 @@ hsBool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, dou
|
||||
if (plAvOneShotTask::fForce3rdPerson && avatar->IsLocalAvatar())
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
pMsg->SetCmd(plCameraMsg::kResponderSetThirdPerson);
|
||||
@ -701,9 +701,9 @@ hsBool plAvOneShotTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, d
|
||||
avatar->GetPhysical()->CheckValidPosition(&overlaps);
|
||||
if (overlaps)
|
||||
{
|
||||
char *buffy = TRACKED_NEW char[64 + strlen(overlaps)];
|
||||
char *buffy = new char[64 + strlen(overlaps)];
|
||||
sprintf(buffy, "Oneshot ends overlapping %s", overlaps);
|
||||
plConsoleMsg *showLine = TRACKED_NEW plConsoleMsg( plConsoleMsg::kAddLine, buffy );
|
||||
plConsoleMsg *showLine = new plConsoleMsg( plConsoleMsg::kAddLine, buffy );
|
||||
showLine->Send();
|
||||
delete[] overlaps;
|
||||
delete[] buffy;
|
||||
@ -719,7 +719,7 @@ hsBool plAvOneShotTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, d
|
||||
if (plAvOneShotTask::fForce3rdPerson && avatar->IsLocalAvatar())
|
||||
{
|
||||
// create message
|
||||
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pMsg = new plCameraMsg;
|
||||
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
pMsg->SetCmd(plCameraMsg::kResponderUndoThirdPerson);
|
||||
|
@ -90,36 +90,36 @@ public:
|
||||
static void GetElements(hsTArray<plClothingElement *> &out)
|
||||
{
|
||||
/*
|
||||
out.Append(TRACKED_NEW plClothingElement("shirt-chest", 768, 0, 256, 512));
|
||||
out.Append(TRACKED_NEW plClothingElement("shirt-sleeve", 512, 192, 256, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("face", 0, 0, 512, 512));
|
||||
out.Append(TRACKED_NEW plClothingElement("eyeball", 64, 512, 64, 64));
|
||||
out.Append(TRACKED_NEW plClothingElement("shoe-top", 0, 832, 128, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("shoe-bottom", 0, 768, 128, 64));
|
||||
out.Append(TRACKED_NEW plClothingElement("pants", 512, 512, 512, 512));
|
||||
out.Append(TRACKED_NEW plClothingElement("hand-LOD", 64, 576, 64, 64));
|
||||
out.Append(TRACKED_NEW plClothingElement("hand-square", 128, 512, 128, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("hand-wide", 0, 640, 256, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("playerbook", 512, 0, 256, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("backpack", 512, 256, 256, 256));
|
||||
out.Append(TRACKED_NEW plClothingElement("glasses-front", 256, 512, 256, 64));
|
||||
out.Append(TRACKED_NEW plClothingElement("glasses-side", 256, 576, 256, 32));
|
||||
out.Append(TRACKED_NEW plClothingElement("KI", 256, 640, 256, 128));
|
||||
out.Append(new plClothingElement("shirt-chest", 768, 0, 256, 512));
|
||||
out.Append(new plClothingElement("shirt-sleeve", 512, 192, 256, 128));
|
||||
out.Append(new plClothingElement("face", 0, 0, 512, 512));
|
||||
out.Append(new plClothingElement("eyeball", 64, 512, 64, 64));
|
||||
out.Append(new plClothingElement("shoe-top", 0, 832, 128, 128));
|
||||
out.Append(new plClothingElement("shoe-bottom", 0, 768, 128, 64));
|
||||
out.Append(new plClothingElement("pants", 512, 512, 512, 512));
|
||||
out.Append(new plClothingElement("hand-LOD", 64, 576, 64, 64));
|
||||
out.Append(new plClothingElement("hand-square", 128, 512, 128, 128));
|
||||
out.Append(new plClothingElement("hand-wide", 0, 640, 256, 128));
|
||||
out.Append(new plClothingElement("playerbook", 512, 0, 256, 128));
|
||||
out.Append(new plClothingElement("backpack", 512, 256, 256, 256));
|
||||
out.Append(new plClothingElement("glasses-front", 256, 512, 256, 64));
|
||||
out.Append(new plClothingElement("glasses-side", 256, 576, 256, 32));
|
||||
out.Append(new plClothingElement("KI", 256, 640, 256, 128));
|
||||
*/
|
||||
out.Append(TRACKED_NEW plClothingElement("Chest", 768, 0, 256, 512));
|
||||
out.Append(TRACKED_NEW plClothingElement("Arm", 512, 192, 256, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("Face", 0, 256, 512, 256));
|
||||
out.Append(TRACKED_NEW plClothingElement("Eye", 64, 704, 64, 64));
|
||||
out.Append(TRACKED_NEW plClothingElement("Extra Hair", 256, 0, 256, 256));
|
||||
out.Append(TRACKED_NEW plClothingElement("Hat", 0, 0, 256, 256));
|
||||
out.Append(TRACKED_NEW plClothingElement("Foot", 0, 768, 256, 256));
|
||||
out.Append(TRACKED_NEW plClothingElement("Legs", 512, 512, 512, 512));
|
||||
out.Append(TRACKED_NEW plClothingElement("LOD", 64, 640, 64, 64));
|
||||
out.Append(TRACKED_NEW plClothingElement("Finger", 128, 640, 128, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("Palm", 0, 512, 256, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("Player Book", 256, 512, 256, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("Glasses", 384, 640, 128, 128));
|
||||
out.Append(TRACKED_NEW plClothingElement("KI", 256, 640, 128, 128));
|
||||
out.Append(new plClothingElement("Chest", 768, 0, 256, 512));
|
||||
out.Append(new plClothingElement("Arm", 512, 192, 256, 128));
|
||||
out.Append(new plClothingElement("Face", 0, 256, 512, 256));
|
||||
out.Append(new plClothingElement("Eye", 64, 704, 64, 64));
|
||||
out.Append(new plClothingElement("Extra Hair", 256, 0, 256, 256));
|
||||
out.Append(new plClothingElement("Hat", 0, 0, 256, 256));
|
||||
out.Append(new plClothingElement("Foot", 0, 768, 256, 256));
|
||||
out.Append(new plClothingElement("Legs", 512, 512, 512, 512));
|
||||
out.Append(new plClothingElement("LOD", 64, 640, 64, 64));
|
||||
out.Append(new plClothingElement("Finger", 128, 640, 128, 128));
|
||||
out.Append(new plClothingElement("Palm", 0, 512, 256, 128));
|
||||
out.Append(new plClothingElement("Player Book", 256, 512, 256, 128));
|
||||
out.Append(new plClothingElement("Glasses", 384, 640, 128, 128));
|
||||
out.Append(new plClothingElement("KI", 256, 640, 128, 128));
|
||||
|
||||
}
|
||||
};
|
||||
|
@ -117,7 +117,7 @@ plCoopCoordinator::plCoopCoordinator(plKey host, plKey guest,
|
||||
|
||||
int len = strlen(hostName) + strlen(guestName) + 3 /* serial num */ + 1;
|
||||
|
||||
char *newName = TRACKED_NEW char[len];
|
||||
char *newName = new char[len];
|
||||
|
||||
serial = serial % 999;
|
||||
|
||||
@ -136,7 +136,7 @@ plCoopCoordinator::plCoopCoordinator(plKey host, plKey guest,
|
||||
// disable our clickability here if we are the guest
|
||||
if (plNetClientMgr::GetInstance()->GetLocalPlayerKey() == guest)
|
||||
{
|
||||
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
|
||||
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
|
||||
pMsg->SetAvKey(guest);
|
||||
pMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
pMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
@ -253,7 +253,7 @@ hsBool plCoopCoordinator::MsgReceive(plMessage *msg)
|
||||
DebugMsg("COOP: Received avatar seek finished msg: aborted = %d", seekDone->fAborted ? 1 : 0);
|
||||
if ( seekDone->fAborted )
|
||||
{
|
||||
plAvCoopMsg *coopM = TRACKED_NEW plAvCoopMsg(plAvCoopMsg::kGuestSeekAbort,fInitiatorID,(uint16_t)fInitiatorSerial);
|
||||
plAvCoopMsg *coopM = new plAvCoopMsg(plAvCoopMsg::kGuestSeekAbort,fInitiatorID,(uint16_t)fInitiatorSerial);
|
||||
coopM->SetBCastFlag(plMessage::kNetPropagate);
|
||||
coopM->SetBCastFlag(plMessage::kNetForce);
|
||||
coopM->AddReceiver(GetKey());
|
||||
@ -262,7 +262,7 @@ hsBool plCoopCoordinator::MsgReceive(plMessage *msg)
|
||||
}
|
||||
else
|
||||
{
|
||||
plAvCoopMsg *coopM = TRACKED_NEW plAvCoopMsg(plAvCoopMsg::kGuestSeeked,fInitiatorID,(uint16_t)fInitiatorSerial);
|
||||
plAvCoopMsg *coopM = new plAvCoopMsg(plAvCoopMsg::kGuestSeeked,fInitiatorID,(uint16_t)fInitiatorSerial);
|
||||
coopM->SetBCastFlag(plMessage::kNetPropagate);
|
||||
coopM->SetBCastFlag(plMessage::kNetForce);
|
||||
coopM->AddReceiver(GetKey());
|
||||
@ -313,7 +313,7 @@ void plCoopCoordinator::IStartHost()
|
||||
plArmatureMod *hostAv = plAvatarMgr::FindAvatar(fHostKey);
|
||||
if (guestAv && hostAv)
|
||||
{
|
||||
plAvSeekMsg *msg = TRACKED_NEW plAvSeekMsg(nil, hostAv->GetKey(), nil, 1.f, true);
|
||||
plAvSeekMsg *msg = new plAvSeekMsg(nil, hostAv->GetKey(), nil, 1.f, true);
|
||||
hsClearBits(msg->fFlags, plAvSeekMsg::kSeekFlagForce3rdPersonOnStart);
|
||||
guestAv->GetPositionAndRotationSim(&msg->fTargetLookAt, nil);
|
||||
hostAv->GetPositionAndRotationSim(&msg->fTargetPos, nil);
|
||||
@ -321,8 +321,8 @@ void plCoopCoordinator::IStartHost()
|
||||
}
|
||||
|
||||
// now tell the host to initiate the thing.
|
||||
plAvTaskBrain *brainT = TRACKED_NEW plAvTaskBrain(fHostBrain);
|
||||
plAvTaskMsg *brainM = TRACKED_NEW plAvTaskMsg(GetKey(), fHostKey, brainT);
|
||||
plAvTaskBrain *brainT = new plAvTaskBrain(fHostBrain);
|
||||
plAvTaskMsg *brainM = new plAvTaskMsg(GetKey(), fHostKey, brainT);
|
||||
brainM->SetBCastFlag(plMessage::kPropagateToModifiers);
|
||||
brainM->Send();
|
||||
}
|
||||
@ -342,9 +342,9 @@ void plCoopCoordinator::IStartGuest()
|
||||
const plSceneObject *targetBone = hostAv->FindBone(fSynchBone);
|
||||
if(targetBone)
|
||||
{
|
||||
plAvSeekMsg *seekMsg = TRACKED_NEW plAvSeekMsg( nil, nil,targetBone->GetKey(), 0, true, kAlignHandle, nil, false, plAvSeekMsg::kSeekFlagNoWarpOnTimeout, GetKey());
|
||||
plAvTaskSeek *seekT = TRACKED_NEW plAvTaskSeek(seekMsg);
|
||||
plAvTaskMsg *seekM = TRACKED_NEW plAvTaskMsg(GetKey(), fGuestKey, seekT);
|
||||
plAvSeekMsg *seekMsg = new plAvSeekMsg( nil, nil,targetBone->GetKey(), 0, true, kAlignHandle, nil, false, plAvSeekMsg::kSeekFlagNoWarpOnTimeout, GetKey());
|
||||
plAvTaskSeek *seekT = new plAvTaskSeek(seekMsg);
|
||||
plAvTaskMsg *seekM = new plAvTaskMsg(GetKey(), fGuestKey, seekT);
|
||||
seekM->SetBCastFlag(plMessage::kPropagateToModifiers);
|
||||
seekM->Send();
|
||||
}
|
||||
@ -356,8 +356,8 @@ void plCoopCoordinator::IStartGuest()
|
||||
void plCoopCoordinator::IContinueGuest()
|
||||
{
|
||||
DebugMsg("COOP: IContinueGuest()");
|
||||
plAvTaskBrain *brainT = TRACKED_NEW plAvTaskBrain(fGuestBrain);
|
||||
plAvTaskMsg *brainM = TRACKED_NEW plAvTaskMsg(GetKey(), fGuestKey, brainT);
|
||||
plAvTaskBrain *brainT = new plAvTaskBrain(fGuestBrain);
|
||||
plAvTaskMsg *brainM = new plAvTaskMsg(GetKey(), fGuestKey, brainT);
|
||||
brainM->SetBCastFlag(plMessage::kPropagateToModifiers);
|
||||
brainM->Send();
|
||||
fGuestBrain = nil; // the armature will destroy the brain when done.
|
||||
@ -370,7 +370,7 @@ void plCoopCoordinator::IAdvanceParticipant(bool host)
|
||||
DebugMsg("COOP: IAdvanceParticipant(%d)", host ? 1 : 0);
|
||||
plKey &who = host ? fHostKey : fGuestKey;
|
||||
|
||||
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg(nil, who,
|
||||
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg(nil, who,
|
||||
plAvBrainGenericMsg::kNextStage, 0, false, 0.0,
|
||||
false, false, 0.0);
|
||||
|
||||
@ -383,7 +383,7 @@ void plCoopCoordinator::IAdvanceParticipant(bool host)
|
||||
// --------------
|
||||
void plCoopCoordinator::IStartTimeout()
|
||||
{
|
||||
plTimerCallbackMsg* timerMsg = TRACKED_NEW plTimerCallbackMsg(GetKey(), kAbortTimer);
|
||||
plTimerCallbackMsg* timerMsg = new plTimerCallbackMsg(GetKey(), kAbortTimer);
|
||||
plgTimerCallbackMgr::NewTimer(kAbortTimerDuration, timerMsg);
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ plAGChannel * plMatrixChannel::MakeBlend(plAGChannel * channelB,
|
||||
|
||||
if (matChanB)
|
||||
{
|
||||
result = TRACKED_NEW plMatrixBlend(this, matChanB, channelBias, blendPriority);
|
||||
result = new plMatrixBlend(this, matChanB, channelBias, blendPriority);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -151,14 +151,14 @@ plAGChannel * plMatrixChannel::MakeBlend(plAGChannel * channelB,
|
||||
// --------------
|
||||
plAGChannel * plMatrixChannel::MakeZeroState()
|
||||
{
|
||||
return TRACKED_NEW plMatrixConstant(Value(0));
|
||||
return new plMatrixConstant(Value(0));
|
||||
}
|
||||
|
||||
// MakeTimeScale --------------------------------------------------------
|
||||
// --------------
|
||||
plAGChannel * plMatrixChannel::MakeTimeScale(plScalarChannel *timeSource)
|
||||
{
|
||||
return TRACKED_NEW plMatrixTimeScale(this, timeSource);
|
||||
return new plMatrixTimeScale(this, timeSource);
|
||||
}
|
||||
|
||||
// Dump -------------------------------------------
|
||||
@ -559,7 +559,7 @@ plAGChannel *plMatrixControllerChannel::MakeCacheChannel(plAnimTimeConvert *atc)
|
||||
{
|
||||
plControllerCacheInfo *cache = fController->CreateCache();
|
||||
cache->SetATC(atc);
|
||||
return TRACKED_NEW plMatrixControllerCacheChannel(this, cache);
|
||||
return new plMatrixControllerCacheChannel(this, cache);
|
||||
}
|
||||
|
||||
void plMatrixControllerChannel::Dump(int indent, bool optimized, double time)
|
||||
|
@ -136,14 +136,14 @@ hsBool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
if(avObj)
|
||||
{
|
||||
// Create a copy of our reference anim stages to give to the brain
|
||||
plAnimStageVec* stages = TRACKED_NEW plAnimStageVec;
|
||||
plAnimStageVec* stages = new plAnimStageVec;
|
||||
int numStages = fStages->size();
|
||||
stages->reserve(numStages);
|
||||
// hack hack hack
|
||||
hsBool ladder = false;
|
||||
for (int i = 0; i < numStages; i++)
|
||||
{
|
||||
plAnimStage* stage = TRACKED_NEW plAnimStage;
|
||||
plAnimStage* stage = new plAnimStage;
|
||||
*stage = *((*fStages)[i]);
|
||||
stages->push_back(stage);
|
||||
if (strstr(stage->GetAnimName(),"adder") != nil)
|
||||
@ -164,14 +164,14 @@ hsBool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
sprintf(sbuf,"plMultistageModMsg - starting multistage from %s",sender->GetName());
|
||||
plAvatarMgr::GetInstance()->GetLog()->AddLine(sbuf);
|
||||
#endif
|
||||
plAvSeekMsg *seeker = TRACKED_NEW plAvSeekMsg(nil, avModKey, seekKey, 1.0f, fSmartSeek);
|
||||
plAvSeekMsg *seeker = new plAvSeekMsg(nil, avModKey, seekKey, 1.0f, fSmartSeek);
|
||||
seeker->Send();
|
||||
|
||||
// these (currently unused) callbacks are for the brain itself, not any of the stages
|
||||
plMessage *exitCallback = nil, *enterCallback = nil;
|
||||
uint32_t exitFlags = plAvBrainGeneric::kExitNormal;
|
||||
|
||||
plAvBrainGeneric *brain = TRACKED_NEW plAvBrainGeneric(stages, exitCallback, enterCallback, sender, exitFlags,
|
||||
plAvBrainGeneric *brain = new plAvBrainGeneric(stages, exitCallback, enterCallback, sender, exitFlags,
|
||||
plAvBrainGeneric::kDefaultFadeIn, plAvBrainGeneric::kDefaultFadeOut,
|
||||
plAvBrainGeneric::kMoveRelative);
|
||||
if (ladder)
|
||||
@ -179,7 +179,7 @@ hsBool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
brain->SetType(plAvBrainGeneric::kLadder);
|
||||
}
|
||||
brain->SetReverseFBControlsOnRelease(fReverseFBControlsOnRelease);
|
||||
plAvPushBrainMsg* pushBrain = TRACKED_NEW plAvPushBrainMsg(GetKey(), avModKey, brain);
|
||||
plAvPushBrainMsg* pushBrain = new plAvPushBrainMsg(GetKey(), avModKey, brain);
|
||||
pushBrain->Send();
|
||||
}
|
||||
}
|
||||
@ -210,14 +210,14 @@ void plMultistageBehMod::Read(hsStream *stream, hsResMgr *mgr)
|
||||
fReverseFBControlsOnRelease = stream->Readbool();
|
||||
|
||||
IDeleteStageVec();
|
||||
fStages = TRACKED_NEW plAnimStageVec;
|
||||
fStages = new plAnimStageVec;
|
||||
int numStages = stream->ReadLE32();
|
||||
fStages->reserve(numStages);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < numStages; i++)
|
||||
{
|
||||
plAnimStage* stage = TRACKED_NEW plAnimStage;
|
||||
plAnimStage* stage = new plAnimStage;
|
||||
stage->Read(stream, mgr);
|
||||
stage->SetMod(this);
|
||||
fStages->push_back(stage);
|
||||
|
@ -185,7 +185,7 @@ void plNPCSpawnMod::ISendNotify(plKey &avatarKey)
|
||||
{
|
||||
if(fNotify)
|
||||
{
|
||||
proSpawnedEventData * event = TRACKED_NEW proSpawnedEventData;
|
||||
proSpawnedEventData * event = new proSpawnedEventData;
|
||||
event->fSpawner = GetKey();
|
||||
event->fSpawnee = avatarKey;
|
||||
fNotify->ClearEvents();
|
||||
|
@ -132,7 +132,7 @@ hsBool plOneShotMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
char *animName = avMod->MakeAnimationName(fAnimName);
|
||||
|
||||
plAvOneShotMsg *avOSmsg = TRACKED_NEW plAvOneShotMsg(myKey, oneShotMsg->fPlayerKey, objKey,
|
||||
plAvOneShotMsg *avOSmsg = new plAvOneShotMsg(myKey, oneShotMsg->fPlayerKey, objKey,
|
||||
fSeekDuration, (hsBool)fSmartSeek, animName, fDrivable,
|
||||
fReversable);
|
||||
|
||||
|
@ -111,7 +111,7 @@ void plPhysicalControllerCore::Update(float delSecs)
|
||||
void plPhysicalControllerCore::SendCorrectionMessages()
|
||||
{
|
||||
plSceneObject* so = plSceneObject::ConvertNoRef(fOwner->ObjectIsLoaded());
|
||||
plCorrectionMsg* corrMsg = TRACKED_NEW plCorrectionMsg;
|
||||
plCorrectionMsg* corrMsg = new plCorrectionMsg;
|
||||
corrMsg->fLocalToWorld = fLastGlobalLoc;
|
||||
corrMsg->fLocalToWorld.GetInverse(&corrMsg->fWorldToLocal);
|
||||
corrMsg->fDirtySynch = true;
|
||||
|
@ -88,19 +88,19 @@ plAGChannel * plPointChannel::MakeCombine(plAGChannel *channelA)
|
||||
// MAKEBLEND
|
||||
plAGChannel * plPointChannel::MakeBlend(plAGChannel * channelB, plScalarChannel * channelBias, int blendPriority)
|
||||
{
|
||||
return TRACKED_NEW plPointBlend(this, (plPointChannel *)channelB, channelBias);
|
||||
return new plPointBlend(this, (plPointChannel *)channelB, channelBias);
|
||||
}
|
||||
|
||||
// MAKEZEROSTATE
|
||||
plAGChannel * plPointChannel::MakeZeroState()
|
||||
{
|
||||
return TRACKED_NEW plPointConstant(Value(0));
|
||||
return new plPointConstant(Value(0));
|
||||
}
|
||||
|
||||
// MAKETIMESCALE
|
||||
plAGChannel * plPointChannel::MakeTimeScale(plScalarChannel *timeSource)
|
||||
{
|
||||
return TRACKED_NEW plPointTimeScale(this, timeSource);
|
||||
return new plPointTimeScale(this, timeSource);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -368,7 +368,7 @@ plAGChannel *plPointControllerChannel::MakeCacheChannel(plAnimTimeConvert *atc)
|
||||
{
|
||||
plControllerCacheInfo *cache = fController->CreateCache();
|
||||
cache->SetATC(atc);
|
||||
return TRACKED_NEW plPointControllerCacheChannel(this, cache);
|
||||
return new plPointControllerCacheChannel(this, cache);
|
||||
}
|
||||
|
||||
// WRITE(stream, mgr)
|
||||
|
@ -96,7 +96,7 @@ plAGChannel * plQuatChannel::MakeCombine(plAGChannel *channelA)
|
||||
{
|
||||
if(plPointChannel::ConvertNoRef(channelA))
|
||||
{
|
||||
return TRACKED_NEW plQuatPointCombine(this, (plPointChannel *)channelA);
|
||||
return new plQuatPointCombine(this, (plPointChannel *)channelA);
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
@ -109,7 +109,7 @@ plAGChannel *plQuatChannel::MakeBlend(plAGChannel *channelB, plScalarChannel *ch
|
||||
plScalarChannel *chanBias = plScalarChannel::ConvertNoRef(channelBias);
|
||||
if(chanB && chanBias)
|
||||
{
|
||||
return TRACKED_NEW plQuatBlend(this, chanB, chanBias);
|
||||
return new plQuatBlend(this, chanB, chanBias);
|
||||
} else {
|
||||
hsStatusMessageF("Blend operation failed.");
|
||||
return this;
|
||||
@ -119,13 +119,13 @@ plAGChannel *plQuatChannel::MakeBlend(plAGChannel *channelB, plScalarChannel *ch
|
||||
// MAKEZEROSTATE
|
||||
plAGChannel * plQuatChannel::MakeZeroState()
|
||||
{
|
||||
return TRACKED_NEW plQuatConstant(Value(0));
|
||||
return new plQuatConstant(Value(0));
|
||||
}
|
||||
|
||||
// MAKETIMESCALE
|
||||
plAGChannel * plQuatChannel::MakeTimeScale(plScalarChannel *timeSource)
|
||||
{
|
||||
return TRACKED_NEW plQuatTimeScale(this, timeSource);
|
||||
return new plQuatTimeScale(this, timeSource);
|
||||
}
|
||||
|
||||
/////////////////
|
||||
|
@ -111,7 +111,7 @@ plAGChannel * plScalarChannel::MakeBlend(plAGChannel * channelB,
|
||||
|
||||
if (chanB)
|
||||
{
|
||||
result = TRACKED_NEW plScalarBlend(this, chanB, chanBias);
|
||||
result = new plScalarBlend(this, chanB, chanBias);
|
||||
} else {
|
||||
hsStatusMessage("Blend operation failed.");
|
||||
}
|
||||
@ -122,14 +122,14 @@ plAGChannel * plScalarChannel::MakeBlend(plAGChannel * channelB,
|
||||
// --------------
|
||||
plAGChannel * plScalarChannel::MakeZeroState()
|
||||
{
|
||||
return TRACKED_NEW plScalarConstant(Value(0));
|
||||
return new plScalarConstant(Value(0));
|
||||
}
|
||||
|
||||
// MakeTimeScale --------------------------------------------------------
|
||||
// --------------
|
||||
plAGChannel * plScalarChannel::MakeTimeScale(plScalarChannel *timeSource)
|
||||
{
|
||||
return TRACKED_NEW plScalarTimeScale(this, timeSource);
|
||||
return new plScalarTimeScale(this, timeSource);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -373,7 +373,7 @@ plAGChannel *plScalarControllerChannel::MakeCacheChannel(plAnimTimeConvert *atc)
|
||||
{
|
||||
plControllerCacheInfo *cache = fController->CreateCache();
|
||||
cache->SetATC(atc);
|
||||
return TRACKED_NEW plScalarControllerCacheChannel(this, cache);
|
||||
return new plScalarControllerCacheChannel(this, cache);
|
||||
}
|
||||
|
||||
// Write -------------------------------------------------------------
|
||||
|
@ -90,7 +90,7 @@ void plSeekPointMod::Read(hsStream *stream, hsResMgr *mgr)
|
||||
int length = stream->ReadLE32();
|
||||
if(length > 0)
|
||||
{
|
||||
fName = TRACKED_NEW char[length + 1];
|
||||
fName = new char[length + 1];
|
||||
stream->Read(length, fName);
|
||||
fName[length] = 0;
|
||||
}
|
||||
|
@ -160,14 +160,14 @@ hsBool plSittingModifier::MsgReceive(plMessage *msg)
|
||||
plAvBrainHuman *brain = (avMod ? plAvBrainHuman::ConvertNoRef(avMod->GetCurrentBrain()) : nil);
|
||||
if (brain && !brain->IsRunningTask())
|
||||
{
|
||||
plNotifyMsg *notifyEnter = TRACKED_NEW plNotifyMsg(); // a message to send back when the brain starts
|
||||
plNotifyMsg *notifyEnter = new plNotifyMsg(); // a message to send back when the brain starts
|
||||
notifyEnter->fState = 1.0f; // it's an "on" event
|
||||
ISetupNotify(notifyEnter, notifyMsg); // copy events and address to sender
|
||||
|
||||
plNotifyMsg *notifyExit = nil;
|
||||
if (avatarKey == plNetClientApp::GetInstance()->GetLocalPlayerKey())
|
||||
{
|
||||
notifyExit = TRACKED_NEW plNotifyMsg(); // a new message to send back when the brain's done
|
||||
notifyExit = new plNotifyMsg(); // a new message to send back when the brain's done
|
||||
notifyExit->fState = 0.0f; // it's an "off" event
|
||||
ISetupNotify(notifyExit, notifyMsg); // copy events and address to sender
|
||||
notifyExit->AddReceiver(GetKey()); // have this message come back to us as well
|
||||
@ -226,27 +226,27 @@ void plSittingModifier::Trigger(const plArmatureMod *avMod, plNotifyMsg *enterNo
|
||||
plAvBrainGeneric *brain = IBuildSitBrain(avModKey, seekKey, &animName, enterNotify, exitNotify);
|
||||
if(brain)
|
||||
{
|
||||
plAvSeekMsg *seekMsg = TRACKED_NEW plAvSeekMsg(ourKey, avModKey, seekKey, 0.0f, true, kAlignHandleAnimEnd, animName);
|
||||
plAvSeekMsg *seekMsg = new plAvSeekMsg(ourKey, avModKey, seekKey, 0.0f, true, kAlignHandleAnimEnd, animName);
|
||||
seekMsg->Send();
|
||||
plAvTaskBrain *brainTask = TRACKED_NEW plAvTaskBrain(brain);
|
||||
plAvTaskMsg *brainMsg = TRACKED_NEW plAvTaskMsg(ourKey, avModKey, brainTask);
|
||||
plAvTaskBrain *brainTask = new plAvTaskBrain(brain);
|
||||
plAvTaskMsg *brainMsg = new plAvTaskMsg(ourKey, avModKey, brainTask);
|
||||
|
||||
brainMsg->Send();
|
||||
|
||||
if (avModKey == plAvatarMgr::GetInstance()->GetLocalAvatarKey())
|
||||
{
|
||||
plCameraMsg* pCam = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pCam = new plCameraMsg;
|
||||
pCam->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pCam->SetCmd(plCameraMsg::kResetPanning);
|
||||
pCam->Send();
|
||||
|
||||
plCameraMsg* pCam2 = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pCam2 = new plCameraMsg;
|
||||
pCam2->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pCam2->SetCmd(plCameraMsg::kPythonSetFirstPersonOverrideEnable);
|
||||
pCam2->SetActivated(false);
|
||||
pCam2->Send();
|
||||
|
||||
plCameraMsg* pCam3 = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pCam3 = new plCameraMsg;
|
||||
pCam3->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pCam3->SetCmd(plCameraMsg::kPythonUndoFirstPerson);
|
||||
pCam3->Send();
|
||||
@ -342,14 +342,14 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe
|
||||
if(sitAnimName)
|
||||
{
|
||||
uint32_t exitFlags = plAvBrainGeneric::kExitNormal; // SOME stages can be interrupted, but not the brain itself
|
||||
brain = TRACKED_NEW plAvBrainGeneric(nil, enterNotify, exitNotify, nil, exitFlags, plAvBrainGeneric::kDefaultFadeIn,
|
||||
brain = new plAvBrainGeneric(nil, enterNotify, exitNotify, nil, exitFlags, plAvBrainGeneric::kDefaultFadeIn,
|
||||
plAvBrainGeneric::kDefaultFadeOut, plAvBrainGeneric::kMoveRelative);
|
||||
|
||||
plAnimStage *sitStage = TRACKED_NEW plAnimStage(sitAnimName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage *sitStage = new plAnimStage(sitAnimName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0);
|
||||
plAnimStage *idleStage = TRACKED_NEW plAnimStage("SitIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage *idleStage = new plAnimStage("SitIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage::kAdvanceOnMove, plAnimStage::kRegressNone, -1);
|
||||
plAnimStage *standStage = TRACKED_NEW plAnimStage(standAnimName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage *standStage = new plAnimStage(standAnimName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone,
|
||||
plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0);
|
||||
|
||||
brain->AddStage(sitStage);
|
||||
@ -370,12 +370,12 @@ void plSittingModifier::UnTrigger()
|
||||
{
|
||||
if (fTriggeredAvatarKey == plAvatarMgr::GetInstance()->GetLocalAvatarKey())
|
||||
{
|
||||
plCameraMsg* pCam = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pCam = new plCameraMsg;
|
||||
pCam->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pCam->SetCmd(plCameraMsg::kResetPanning);
|
||||
pCam->Send();
|
||||
|
||||
plCameraMsg* pCam2 = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* pCam2 = new plCameraMsg;
|
||||
pCam2->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pCam2->SetCmd(plCameraMsg::kPythonSetFirstPersonOverrideEnable);
|
||||
pCam2->SetActivated(true);
|
||||
|
@ -91,7 +91,7 @@ void plSwimCircularCurrentRegion::Read(hsStream* stream, hsResMgr* mgr)
|
||||
fPullNearVel = stream->ReadLEScalar();
|
||||
fPullFarDistSq = stream->ReadLEScalar();
|
||||
fPullFarVel = stream->ReadLEScalar();
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // currentSO
|
||||
mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // currentSO
|
||||
}
|
||||
|
||||
void plSwimCircularCurrentRegion::Write(hsStream* stream, hsResMgr* mgr)
|
||||
@ -208,7 +208,7 @@ void plSwimStraightCurrentRegion::Read(hsStream* stream, hsResMgr* mgr)
|
||||
fNearVel = stream->ReadLEScalar();
|
||||
fFarDist = stream->ReadLEScalar();
|
||||
fFarVel = stream->ReadLEScalar();
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // currentSO
|
||||
mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // currentSO
|
||||
}
|
||||
|
||||
void plSwimStraightCurrentRegion::Write(hsStream* stream, hsResMgr* mgr)
|
||||
|
Reference in New Issue
Block a user