Allow default scripts (#1117)

Fix an issue where vanity script overwrote always
This commit is contained in:
David Markowitz 2023-06-20 08:40:16 -07:00 committed by GitHub
parent 132d31d3ab
commit fe23c7c5f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,7 @@ void VanityUtilities::SpawnVanity() {
auto* scriptComponent = npcEntity->GetComponent<ScriptComponent>();
if (scriptComponent != nullptr) {
if (scriptComponent && !npc.m_Script.empty()) {
scriptComponent->SetScript(npc.m_Script);
scriptComponent->SetSerialized(false);