mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Fix ConsoleTrigger memory leak
This commit is contained in:
@ -368,11 +368,11 @@ PF_CONSOLE_CMD( Avatar_Multistage, Trigger, "string multiComp", "Triggers the na
|
||||
|
||||
// Setup the event data in case this is a OneShot responder that needs it
|
||||
plKey playerKey = plAvatarMgr::GetInstance()->GetLocalAvatar()->GetKey();
|
||||
proPickedEventData *ed = new proPickedEventData;
|
||||
ed->fPicker = playerKey;
|
||||
ed->fPicked = key; // ???
|
||||
msg->AddEvent(ed);
|
||||
|
||||
proPickedEventData ed;
|
||||
ed.fPicker = playerKey;
|
||||
ed.fPicked = key; // ???
|
||||
msg->AddEvent(&ed);
|
||||
|
||||
// Send it to the responder modifier
|
||||
msg->AddReceiver(key);
|
||||
plgDispatch::MsgSend(msg);
|
||||
|
@ -370,7 +370,10 @@ public:
|
||||
void SetType(notificationType type) { fType = type; }
|
||||
void SetState(float state) { fState = state; }
|
||||
|
||||
// event records for the notify message
|
||||
/**
|
||||
* Adds an arbitrary event to this notify message.
|
||||
* \note This copies \a ed.
|
||||
*/
|
||||
void AddEvent( proEventData* ed);
|
||||
void AddCollisionEvent( bool enter, const plKey &other, const plKey &self, bool onlyOneCollision=true );
|
||||
void AddPickEvent( const plKey &other, const plKey& self, bool enabled, hsPoint3 hitPoint );
|
||||
|
@ -56,10 +56,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
void plLogicModBase::ConsoleTrigger(plKey playerKey)
|
||||
{
|
||||
// Setup the event data in case this is a OneShot responder that needs it
|
||||
proPickedEventData *ed = new proPickedEventData;
|
||||
ed->fPicker = playerKey;
|
||||
ed->fPicked = nil;
|
||||
fNotify->AddEvent(ed);
|
||||
proPickedEventData ed;
|
||||
ed.fPicker = playerKey;
|
||||
ed.fPicked = nullptr;
|
||||
fNotify->AddEvent(&ed);
|
||||
|
||||
Trigger(false);
|
||||
|
||||
|
Reference in New Issue
Block a user