mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Release script callbacks properly in main plugin.
This commit is contained in:
parent
da5e83151c
commit
86a4933525
@ -524,7 +524,7 @@ void Core::BindEvent(Int32 id, Object & env, Function & func)
|
||||
// Is the specified callback function null?
|
||||
if (func.IsNull())
|
||||
{
|
||||
event.Release(); // Then release the current callback
|
||||
event.ReleaseGently(); // Then release the current callback
|
||||
}
|
||||
// Does this function need a custom environment?
|
||||
else if (env.IsNull())
|
||||
|
@ -103,7 +103,7 @@ void CBlip::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
// Is the specified callback function null?
|
||||
if (func.IsNull())
|
||||
{
|
||||
event.Release(); // Then release the current callback
|
||||
event.ReleaseGently(); // Then release the current callback
|
||||
}
|
||||
// Does this function need a custom environment?
|
||||
else if (env.IsNull())
|
||||
|
@ -116,7 +116,7 @@ void CCheckpoint::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
// Is the specified callback function null?
|
||||
if (func.IsNull())
|
||||
{
|
||||
event.Release(); // Then release the current callback
|
||||
event.ReleaseGently(); // Then release the current callback
|
||||
}
|
||||
// Does this function need a custom environment?
|
||||
else if (env.IsNull())
|
||||
|
@ -103,7 +103,7 @@ void CKeybind::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
// Is the specified callback function null?
|
||||
if (func.IsNull())
|
||||
{
|
||||
event.Release(); // Then release the current callback
|
||||
event.ReleaseGently(); // Then release the current callback
|
||||
}
|
||||
// Does this function need a custom environment?
|
||||
else if (env.IsNull())
|
||||
|
@ -116,7 +116,7 @@ void CObject::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
// Is the specified callback function null?
|
||||
if (func.IsNull())
|
||||
{
|
||||
event.Release(); // Then release the current callback
|
||||
event.ReleaseGently(); // Then release the current callback
|
||||
}
|
||||
// Does this function need a custom environment?
|
||||
else if (env.IsNull())
|
||||
|
@ -108,7 +108,7 @@ void CPickup::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
// Is the specified callback function null?
|
||||
if (func.IsNull())
|
||||
{
|
||||
event.Release(); // Then release the current callback
|
||||
event.ReleaseGently(); // Then release the current callback
|
||||
}
|
||||
// Does this function need a custom environment?
|
||||
else if (env.IsNull())
|
||||
|
@ -125,7 +125,7 @@ void CPlayer::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
// Is the specified callback function null?
|
||||
if (func.IsNull())
|
||||
{
|
||||
event.Release(); // Then release the current callback
|
||||
event.ReleaseGently(); // Then release the current callback
|
||||
}
|
||||
// Does this function need a custom environment?
|
||||
else if (env.IsNull())
|
||||
|
@ -112,7 +112,7 @@ void CVehicle::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
// Is the specified callback function null?
|
||||
if (func.IsNull())
|
||||
{
|
||||
event.Release(); // Then release the current callback
|
||||
event.ReleaseGently(); // Then release the current callback
|
||||
}
|
||||
// Does this function need a custom environment?
|
||||
else if (env.IsNull())
|
||||
|
Loading…
Reference in New Issue
Block a user