1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-15 14:47:13 +02:00

Make the function environment optional in entity callbacks.

This commit is contained in:
Sandu Liviu Catalin
2016-05-24 07:29:14 +03:00
parent 33790805eb
commit 3ed0b22426
7 changed files with 35 additions and 0 deletions

View File

@ -118,6 +118,11 @@ void CCheckpoint::BindEvent(Int32 evid, Object & env, Function & func) const
{
event.Release(); // Then release the current callback
}
// Does this function need a custom environment?
else if (env.IsNull())
{
event = func;
}
// Assign the specified environment and function
else
{