mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-05-02 09:07:12 +02: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?
|
// Is the specified callback function null?
|
||||||
if (func.IsNull())
|
if (func.IsNull())
|
||||||
{
|
{
|
||||||
event.Release(); // Then release the current callback
|
event.ReleaseGently(); // Then release the current callback
|
||||||
}
|
}
|
||||||
// Does this function need a custom environment?
|
// Does this function need a custom environment?
|
||||||
else if (env.IsNull())
|
else if (env.IsNull())
|
||||||
|
@ -103,7 +103,7 @@ void CBlip::BindEvent(Int32 evid, Object & env, Function & func) const
|
|||||||
// Is the specified callback function null?
|
// Is the specified callback function null?
|
||||||
if (func.IsNull())
|
if (func.IsNull())
|
||||||
{
|
{
|
||||||
event.Release(); // Then release the current callback
|
event.ReleaseGently(); // Then release the current callback
|
||||||
}
|
}
|
||||||
// Does this function need a custom environment?
|
// Does this function need a custom environment?
|
||||||
else if (env.IsNull())
|
else if (env.IsNull())
|
||||||
|
@ -116,7 +116,7 @@ void CCheckpoint::BindEvent(Int32 evid, Object & env, Function & func) const
|
|||||||
// Is the specified callback function null?
|
// Is the specified callback function null?
|
||||||
if (func.IsNull())
|
if (func.IsNull())
|
||||||
{
|
{
|
||||||
event.Release(); // Then release the current callback
|
event.ReleaseGently(); // Then release the current callback
|
||||||
}
|
}
|
||||||
// Does this function need a custom environment?
|
// Does this function need a custom environment?
|
||||||
else if (env.IsNull())
|
else if (env.IsNull())
|
||||||
|
@ -103,7 +103,7 @@ void CKeybind::BindEvent(Int32 evid, Object & env, Function & func) const
|
|||||||
// Is the specified callback function null?
|
// Is the specified callback function null?
|
||||||
if (func.IsNull())
|
if (func.IsNull())
|
||||||
{
|
{
|
||||||
event.Release(); // Then release the current callback
|
event.ReleaseGently(); // Then release the current callback
|
||||||
}
|
}
|
||||||
// Does this function need a custom environment?
|
// Does this function need a custom environment?
|
||||||
else if (env.IsNull())
|
else if (env.IsNull())
|
||||||
|
@ -116,7 +116,7 @@ void CObject::BindEvent(Int32 evid, Object & env, Function & func) const
|
|||||||
// Is the specified callback function null?
|
// Is the specified callback function null?
|
||||||
if (func.IsNull())
|
if (func.IsNull())
|
||||||
{
|
{
|
||||||
event.Release(); // Then release the current callback
|
event.ReleaseGently(); // Then release the current callback
|
||||||
}
|
}
|
||||||
// Does this function need a custom environment?
|
// Does this function need a custom environment?
|
||||||
else if (env.IsNull())
|
else if (env.IsNull())
|
||||||
|
@ -108,7 +108,7 @@ void CPickup::BindEvent(Int32 evid, Object & env, Function & func) const
|
|||||||
// Is the specified callback function null?
|
// Is the specified callback function null?
|
||||||
if (func.IsNull())
|
if (func.IsNull())
|
||||||
{
|
{
|
||||||
event.Release(); // Then release the current callback
|
event.ReleaseGently(); // Then release the current callback
|
||||||
}
|
}
|
||||||
// Does this function need a custom environment?
|
// Does this function need a custom environment?
|
||||||
else if (env.IsNull())
|
else if (env.IsNull())
|
||||||
|
@ -125,7 +125,7 @@ void CPlayer::BindEvent(Int32 evid, Object & env, Function & func) const
|
|||||||
// Is the specified callback function null?
|
// Is the specified callback function null?
|
||||||
if (func.IsNull())
|
if (func.IsNull())
|
||||||
{
|
{
|
||||||
event.Release(); // Then release the current callback
|
event.ReleaseGently(); // Then release the current callback
|
||||||
}
|
}
|
||||||
// Does this function need a custom environment?
|
// Does this function need a custom environment?
|
||||||
else if (env.IsNull())
|
else if (env.IsNull())
|
||||||
|
@ -112,7 +112,7 @@ void CVehicle::BindEvent(Int32 evid, Object & env, Function & func) const
|
|||||||
// Is the specified callback function null?
|
// Is the specified callback function null?
|
||||||
if (func.IsNull())
|
if (func.IsNull())
|
||||||
{
|
{
|
||||||
event.Release(); // Then release the current callback
|
event.ReleaseGently(); // Then release the current callback
|
||||||
}
|
}
|
||||||
// Does this function need a custom environment?
|
// Does this function need a custom environment?
|
||||||
else if (env.IsNull())
|
else if (env.IsNull())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user