mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-24 06:27:24 +00:00
Allow default scripts
Fix an issue where vanity script overwrote always
This commit is contained in:
parent
1a74c028c2
commit
5bdd030faf
@ -119,7 +119,7 @@ void VanityUtilities::SpawnVanity() {
|
|||||||
|
|
||||||
auto* scriptComponent = npcEntity->GetComponent<ScriptComponent>();
|
auto* scriptComponent = npcEntity->GetComponent<ScriptComponent>();
|
||||||
|
|
||||||
if (scriptComponent != nullptr) {
|
if (scriptComponent && !npc.m_Script.empty()) {
|
||||||
scriptComponent->SetScript(npc.m_Script);
|
scriptComponent->SetScript(npc.m_Script);
|
||||||
scriptComponent->SetSerialized(false);
|
scriptComponent->SetSerialized(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user