mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-07 13:27:13 +01:00
Null instances initialized too late.
They must be initialized before executing scripts.
This commit is contained in:
parent
7c7c1210e6
commit
789fb31273
@ -380,6 +380,15 @@ bool Core::Initialize()
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool Core::Execute()
|
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?
|
// Are there any scripts to execute?
|
||||||
if (m_PendingScripts.empty())
|
if (m_PendingScripts.empty())
|
||||||
{
|
{
|
||||||
@ -423,15 +432,6 @@ bool Core::Execute()
|
|||||||
levels, static_cast< SQUnsignedInteger >(m_PendingScripts.size()));
|
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;
|
m_LockPreLoadSignal = true;
|
||||||
// Trigger callbacks that must initialize stuff before the loaded event is triggered
|
// Trigger callbacks that must initialize stuff before the loaded event is triggered
|
||||||
(*mOnPreLoad.first)();
|
(*mOnPreLoad.first)();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user