mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-19 16:47:14 +02:00
Make the function environment optional in entity callbacks.
This commit is contained in:
@ -114,6 +114,11 @@ void CVehicle::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
|
||||
{
|
||||
|
Reference in New Issue
Block a user