mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Allow default scripts (#1117)
Fix an issue where vanity script overwrote always
This commit is contained in:
parent
132d31d3ab
commit
fe23c7c5f7
@ -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