mirror of
				https://github.com/VCMP-SqMod/SqMod.git
				synced 2025-11-04 00:07:19 +01:00 
			
		
		
		
	Null instances initialized too late.
They must be initialized before executing scripts.
This commit is contained in:
		@@ -380,6 +380,15 @@ bool Core::Initialize()
 | 
			
		||||
// ------------------------------------------------------------------------------------------------
 | 
			
		||||
bool Core::Execute()
 | 
			
		||||
{
 | 
			
		||||
    // Create the null entity instances
 | 
			
		||||
    m_NullBlip = LightObj(new CBlip(-1));
 | 
			
		||||
    m_NullCheckpoint = LightObj(new CCheckpoint(-1));
 | 
			
		||||
    m_NullKeybind = LightObj(new CKeybind(-1));
 | 
			
		||||
    m_NullObject = LightObj(new CObject(-1));
 | 
			
		||||
    m_NullPickup = LightObj(new CPickup(-1));
 | 
			
		||||
    m_NullPlayer = LightObj(new CPlayer(-1));
 | 
			
		||||
    m_NullVehicle = LightObj(new CVehicle(-1));
 | 
			
		||||
 | 
			
		||||
    // Are there any scripts to execute?
 | 
			
		||||
    if (m_PendingScripts.empty())
 | 
			
		||||
    {
 | 
			
		||||
@@ -423,15 +432,6 @@ bool Core::Execute()
 | 
			
		||||
                    levels, static_cast< SQUnsignedInteger >(m_PendingScripts.size()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Create the null entity instances
 | 
			
		||||
    m_NullBlip = LightObj(new CBlip(-1));
 | 
			
		||||
    m_NullCheckpoint = LightObj(new CCheckpoint(-1));
 | 
			
		||||
    m_NullKeybind = LightObj(new CKeybind(-1));
 | 
			
		||||
    m_NullObject = LightObj(new CObject(-1));
 | 
			
		||||
    m_NullPickup = LightObj(new CPickup(-1));
 | 
			
		||||
    m_NullPlayer = LightObj(new CPlayer(-1));
 | 
			
		||||
    m_NullVehicle = LightObj(new CVehicle(-1));
 | 
			
		||||
 | 
			
		||||
    m_LockPreLoadSignal = true;
 | 
			
		||||
    // Trigger callbacks that must initialize stuff before the loaded event is triggered
 | 
			
		||||
    (*mOnPreLoad.first)();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user