mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-31 18:07:14 +01:00
Move the creation of null instances after the execution of scripts in order to allow customization of entity types.
This commit is contained in:
parent
e9628e76de
commit
7ebfe05cb3
@ -286,15 +286,6 @@ bool Core::Initialize()
|
|||||||
return false; // Can't execute scripts without a valid API!
|
return false; // Can't execute scripts without a valid API!
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the null entity instances
|
|
||||||
m_NullBlip = Object(new CBlip(-1));
|
|
||||||
m_NullCheckpoint = Object(new CCheckpoint(-1));
|
|
||||||
m_NullKeybind = Object(new CKeybind(-1));
|
|
||||||
m_NullObject = Object(new CObject(-1));
|
|
||||||
m_NullPickup = Object(new CPickup(-1));
|
|
||||||
m_NullPlayer = Object(new CPlayer(-1));
|
|
||||||
m_NullVehicle = Object(new CVehicle(-1));
|
|
||||||
|
|
||||||
CSimpleIniA::TNamesDepend scripts;
|
CSimpleIniA::TNamesDepend scripts;
|
||||||
// Attempt to retrieve the list of keys to make sure there's actually something to process
|
// Attempt to retrieve the list of keys to make sure there's actually something to process
|
||||||
if (conf.GetAllKeys("Scripts", scripts) && scripts.size() > 0)
|
if (conf.GetAllKeys("Scripts", scripts) && scripts.size() > 0)
|
||||||
@ -432,6 +423,15 @@ bool Core::Execute()
|
|||||||
LogScs("Successfully executed script: %s", s.mPath.c_str());
|
LogScs("Successfully executed script: %s", s.mPath.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create the null entity instances
|
||||||
|
m_NullBlip = Object(new CBlip(-1));
|
||||||
|
m_NullCheckpoint = Object(new CCheckpoint(-1));
|
||||||
|
m_NullKeybind = Object(new CKeybind(-1));
|
||||||
|
m_NullObject = Object(new CObject(-1));
|
||||||
|
m_NullPickup = Object(new CPickup(-1));
|
||||||
|
m_NullPlayer = Object(new CPlayer(-1));
|
||||||
|
m_NullVehicle = Object(new CVehicle(-1));
|
||||||
|
|
||||||
// Notify the script callback that the scripts were loaded
|
// Notify the script callback that the scripts were loaded
|
||||||
EmitScriptLoaded();
|
EmitScriptLoaded();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user