mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +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
|
// Setup the event data in case this is a OneShot responder that needs it
|
||||||
plKey playerKey = plAvatarMgr::GetInstance()->GetLocalAvatar()->GetKey();
|
plKey playerKey = plAvatarMgr::GetInstance()->GetLocalAvatar()->GetKey();
|
||||||
proPickedEventData *ed = new proPickedEventData;
|
proPickedEventData ed;
|
||||||
ed->fPicker = playerKey;
|
ed.fPicker = playerKey;
|
||||||
ed->fPicked = key; // ???
|
ed.fPicked = key; // ???
|
||||||
msg->AddEvent(ed);
|
msg->AddEvent(&ed);
|
||||||
|
|
||||||
// Send it to the responder modifier
|
// Send it to the responder modifier
|
||||||
msg->AddReceiver(key);
|
msg->AddReceiver(key);
|
||||||
plgDispatch::MsgSend(msg);
|
plgDispatch::MsgSend(msg);
|
||||||
|
@ -370,7 +370,10 @@ public:
|
|||||||
void SetType(notificationType type) { fType = type; }
|
void SetType(notificationType type) { fType = type; }
|
||||||
void SetState(float state) { fState = state; }
|
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 AddEvent( proEventData* ed);
|
||||||
void AddCollisionEvent( bool enter, const plKey &other, const plKey &self, bool onlyOneCollision=true );
|
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 );
|
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)
|
void plLogicModBase::ConsoleTrigger(plKey playerKey)
|
||||||
{
|
{
|
||||||
// Setup the event data in case this is a OneShot responder that needs it
|
// Setup the event data in case this is a OneShot responder that needs it
|
||||||
proPickedEventData *ed = new proPickedEventData;
|
proPickedEventData ed;
|
||||||
ed->fPicker = playerKey;
|
ed.fPicker = playerKey;
|
||||||
ed->fPicked = nil;
|
ed.fPicked = nullptr;
|
||||||
fNotify->AddEvent(ed);
|
fNotify->AddEvent(&ed);
|
||||||
|
|
||||||
Trigger(false);
|
Trigger(false);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user