1
0
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:
Sandu Liviu Catalin 2016-05-24 21:36:49 +03:00
parent da5e83151c
commit 86a4933525
8 changed files with 8 additions and 8 deletions

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())