1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Mark the script as executed before invoking the callbacks.

This commit is contained in:
Sandu Liviu Catalin 2021-01-17 11:22:53 +02:00
parent efe0748d67
commit 9579fcfe64

View File

@ -430,6 +430,9 @@ bool Core::Execute()
// Force enable null entities if not already enabled by script
EnableNullEntities();
// At this point, the scripts were executed
m_Executed = true;
m_LockPreLoadSignal = true;
// Trigger callbacks that must initialize stuff before the loaded event is triggered
(*mOnPreLoad.first)();
@ -453,8 +456,9 @@ bool Core::Execute()
ImportObjects();
ImportPickups();
ImportVehicles();
// Successfully executed
return (m_Executed = true);
return m_Executed;
}
// ------------------------------------------------------------------------------------------------